Closed
Bug 862353
Opened 11 years ago
Closed 11 years ago
Set dom.mozContacts.enabled in mochitests
Categories
(Core :: DOM: Device Interfaces, defect)
Core
DOM: Device Interfaces
Tracking
()
RESOLVED
FIXED
mozilla24
People
(Reporter: reuben, Assigned: reuben)
References
Details
(Whiteboard: [fixed-in-birch])
Attachments
(4 files, 3 obsolete files)
7.07 KB,
patch
|
bent.mozilla
:
review+
|
Details | Diff | Splinter Review |
13.74 KB,
patch
|
gwagner
:
review+
bent.mozilla
:
feedback+
|
Details | Diff | Splinter Review |
14.19 KB,
patch
|
gwagner
:
review+
|
Details | Diff | Splinter Review |
1.21 KB,
patch
|
reuben
:
review+
|
Details | Diff | Splinter Review |
We should enable those in the automation instead of adding pref setting code to every test that uses those APIs.
Assignee | ||
Comment 1•11 years ago
|
||
Attachment #737993 -
Flags: review?(anygregor)
Assignee | ||
Comment 2•11 years ago
|
||
Comment on attachment 737993 [details] [diff] [review] Enable mozContacts and mozSettings for mochitests We can't do this right now because the app-startup branch is NavigatorPropertyHelper runs too early. I plan on implementing this in a way that will respect resetting the pref later (and having the pref enabled on the profile). Ben, you can use addLoadEvent in the test to fix bug 778256 until this is done, if you want.
Attachment #737993 -
Flags: review?(anygregor)
Comment 3•11 years ago
|
||
Thanks Reuben. I'll check it out tonight. I'm curious if this will address the original issue on Android in bug 778256. We'll see what the try server says.
Assignee | ||
Updated•11 years ago
|
Summary: Set dom.(mozSettings|mozContacts).enabled for mochitests → Set dom.mozContacts.enabled in mochitests
Assignee | ||
Comment 4•11 years ago
|
||
This is based in bug 863704, which just landed. Settings is more complicated, I'm looking into it.
Attachment #737993 -
Attachment is obsolete: true
Attachment #744381 -
Flags: review?(anygregor)
Assignee | ||
Comment 5•11 years ago
|
||
Comment on attachment 744381 [details] [diff] [review] Enable dom.mozContacts.enabled in mochitests Review of attachment 744381 [details] [diff] [review]: ----------------------------------------------------------------- ::: testing/profiles/prefs_general.js @@ +110,5 @@ > user_pref("layout.css.report_errors", true); > + > +// Enable mozContacts > +user_pref("dom.navigator-property.disable.mozContacts", false); > +user_pref("dom.global-constructor.disable.mozContact", false); This is missing the main "dom.mozContacts.enabled" pref for some reason, pretend that it's here :)
Assignee | ||
Comment 6•11 years ago
|
||
The settings problem might be simpler than I originally thought.
Assignee | ||
Comment 7•11 years ago
|
||
Assignee | ||
Comment 8•11 years ago
|
||
Let's see if the settings patch continues to misbehave: https://tbpl.mozilla.org/?tree=Try&rev=1bbe3696c921
Assignee | ||
Comment 9•11 years ago
|
||
This allows us to do a bunch of clean up on the tests and remove the NavigatorPropertyHelper service, which serves the sole purpose of letting desktop mochitests access the API. Ben, does this look OK?
Attachment #744381 -
Attachment is obsolete: true
Attachment #744381 -
Flags: review?(anygregor)
Attachment #746017 -
Flags: feedback?(bent.mozilla)
Assignee | ||
Comment 10•11 years ago
|
||
I think I figured the VM mochitest failures out, let's see: https://tbpl.mozilla.org/?tree=Try&rev=5d7714241d26
Attachment #744481 -
Attachment is obsolete: true
Comment on attachment 746017 [details] [diff] [review] Enable mozContacts in B2G and mochitests Review of attachment 746017 [details] [diff] [review]: ----------------------------------------------------------------- Sounds fine to me!
Attachment #746017 -
Flags: feedback?(bent.mozilla) → feedback+
Comment 12•11 years ago
|
||
Comment on attachment 746017 [details] [diff] [review] Enable mozContacts in B2G and mochitests Review of attachment 746017 [details] [diff] [review]: ----------------------------------------------------------------- ::: b2g/app/b2g.js @@ +384,5 @@ > > // Temporary permission hack for WebContacts > pref("dom.mozContacts.enabled", true); > +pref("dom.navigator-property.disable.mozContacts", false); > +pref("dom.global-constructor.disable.mozContact", false); Alright if we have 3 redundant prefs we should unify them. Either all of them have to be true or false.
Updated•11 years ago
|
Attachment #746017 -
Flags: review+
Assignee | ||
Comment 13•11 years ago
|
||
Comment on attachment 746020 [details] [diff] [review] Enable mozSettings in B2G and mochitests Review of attachment 746020 [details] [diff] [review]: ----------------------------------------------------------------- Same thing but for Settings. Also fixes some geolocation tests that flip the pref. Ben, does this fix the Android failures?
Attachment #746020 -
Flags: review?(anygregor)
Attachment #746020 -
Flags: feedback?(bkelly)
Assignee | ||
Updated•11 years ago
|
Attachment #744482 -
Flags: review?(bent.mozilla)
Updated•11 years ago
|
Attachment #746020 -
Flags: review?(anygregor) → review+
Updated•11 years ago
|
Attachment #744482 -
Flags: review?(bent.mozilla) → review+
Assignee | ||
Comment 14•11 years ago
|
||
Thanks! https://hg.mozilla.org/projects/birch/rev/74b0d6784412 https://hg.mozilla.org/projects/birch/rev/62b448f166ad https://hg.mozilla.org/projects/birch/rev/97b938ea14fe
Whiteboard: [fixed-in-birch]
Comment 15•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/74b0d6784412 https://hg.mozilla.org/mozilla-central/rev/62b448f166ad https://hg.mozilla.org/mozilla-central/rev/97b938ea14fe
Status: NEW → RESOLVED
Closed: 11 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
Comment 16•11 years ago
|
||
As discussed on IRC, this check in geolocation_common.js should not be needed any more. https://tbpl.mozilla.org/?tree=Try&rev=ffd7c26ea262
Attachment #749374 -
Flags: review?(reuben.bmo)
Assignee | ||
Comment 17•11 years ago
|
||
Comment on attachment 749374 [details] [diff] [review] Remove stale code in geolocation that checks for mozsettings. Review of attachment 749374 [details] [diff] [review]: ----------------------------------------------------------------- Nice catch, thanks! ::: dom/tests/mochitest/geolocation/geolocation_common.js @@ +97,5 @@ > // optional ok(location.coords.altitudeAccuracy == 42, "alt acc matches known value"); > } > > function toggleGeolocationSetting(value, callback) { > var mozSettings = window.navigator.mozSettings; nit: inline this into the next line
Attachment #749374 -
Flags: review?(reuben.bmo) → review+
Assignee | ||
Comment 18•11 years ago
|
||
https://hg.mozilla.org/projects/birch/rev/9a69db5596ce
Comment 20•11 years ago
|
||
Thunderbird bustage fix: http://hg.mozilla.org/comm-central/rev/7c9d7c3ebc5c
Updated•11 years ago
|
Attachment #746020 -
Flags: feedback?(bkelly)
You need to log in
before you can comment on or make changes to this bug.
Description
•