Closed
Bug 1197266
Opened 9 years ago
Closed 9 years ago
pushPrefEnv values aren't reset in between mochitest-browser tests
Categories
(Testing :: Mochitest, defect)
Testing
Mochitest
Tracking
(firefox43 fixed)
RESOLVED
FIXED
mozilla43
Tracking | Status | |
---|---|---|
firefox43 | --- | fixed |
People
(Reporter: bgrins, Unassigned)
References
Details
Attachments
(2 files)
5.21 KB,
patch
|
Details | Diff | Splinter Review | |
1.01 KB,
patch
|
martijn.martijn
:
review+
|
Details | Diff | Splinter Review |
After setting some prefs via pushPrefEnv in one test, I noticed that the prefs weren't being reset in the next test. It seems that flushPrefEnv isn't being called in between tests.
Reporter | ||
Comment 1•9 years ago
|
||
You can see the failure by applying this patch and then running: ./mach mochitest -f browser browser/base/content/test/general/ --start-at browser_mixedcontent_securityflags.js --end-at browser_no_mcb_on_http_site.js 100 INFO TEST-UNEXPECTED-FAIL | browser/base/content/test/general/browser_no_mcb_on_http_site.js | Default value has been restored - Got true, expected false Stack trace:
Comment 2•9 years ago
|
||
Reminds me of bug 943152, which was for mochitest-chrome.
Comment 3•9 years ago
|
||
I guess this is where the specialpowers stuff is injected for mochitest-browser: http://mxr.mozilla.org/mozilla-central/source/testing/mochitest/browser-test.js#156 Perhaps, it would just work if you replace in that line ChromePowers.js with specialpowers.js. I tried the same in bug 1041563, but there it was part of the whole ChromePowers.js removal.
Reporter | ||
Comment 4•9 years ago
|
||
(In reply to Martijn Wargers [:mwargers] (QA) from comment #3) > I guess this is where the specialpowers stuff is injected for > mochitest-browser: > http://mxr.mozilla.org/mozilla-central/source/testing/mochitest/browser-test. > js#156 > Perhaps, it would just work if you replace in that line ChromePowers.js with > specialpowers.js. > > I tried the same in bug 1041563, but there it was part of the whole > ChromePowers.js removal. Maybe we need to call SpecialPowers.flushPrefEnv in that file somewhere in a cleanup function
Comment 5•9 years ago
|
||
Yes, but it would be better if we could replace ChromePowers.js with specialpowers.js. ChromePowers.js is meant as a stub for usage in chrome, where specialpowers.js wouldn't work. It would be better if ChromePowers.js be not used, if possible.
Comment 6•9 years ago
|
||
This patch just flushes during nextTest. It fixes the failure with the tests added in bug 1168042.
Attachment #8662137 -
Flags: review?(martijn.martijn)
Updated•9 years ago
|
Attachment #8662137 -
Flags: review?(martijn.martijn) → review+
Comment 7•9 years ago
|
||
url: https://hg.mozilla.org/integration/mozilla-inbound/rev/af944d4a75f004837d28bf109c3956db63fc589d changeset: af944d4a75f004837d28bf109c3956db63fc589d user: Neil Deakin <neil@mozilla.com> date: Thu Sep 17 11:20:32 2015 -0400 description: Bug 1197266, Reset pushed pref environment between browser tests, r=martijn
https://hg.mozilla.org/mozilla-central/rev/af944d4a75f0
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox43:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla43
You need to log in
before you can comment on or make changes to this bug.
Description
•