Bug 1197266, Reset pushed pref environment between browser tests, r=martijn
authorNeil Deakin <neil@mozilla.com>
Thu, 17 Sep 2015 11:20:32 -0400
changeset 295682 af944d4a75f004837d28bf109c3956db63fc589d
parent 295681 380a1d59bbc37b6dff323c58b03a6616b88d992d
child 295683 837fa5b51ffafe2816b644440561ce2ad2a50cc5
push id5245
push userraliiev@mozilla.com
push dateThu, 29 Oct 2015 11:30:51 +0000
treeherdermozilla-beta@dac831dc1bd0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmartijn
bugs1197266
milestone43.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1197266, Reset pushed pref environment between browser tests, r=martijn
testing/mochitest/browser-test.js
--- a/testing/mochitest/browser-test.js
+++ b/testing/mochitest/browser-test.js
@@ -475,16 +475,18 @@ Tester.prototype = {
         }
       }, this);
 
       // Clear document.popupNode.  The test could have set it to a custom value
       // for its own purposes, nulling it out it will go back to the default
       // behavior of returning the last opened popup.
       document.popupNode = null;
 
+      yield new Promise(resolve => SpecialPowers.flushPrefEnv(resolve));
+
       // Notify a long running test problem if it didn't end up in a timeout.
       if (this.currentTest.unexpectedTimeouts && !this.currentTest.timedOut) {
         let msg = "This test exceeded the timeout threshold. It should be " +
                   "rewritten or split up. If that's not possible, use " +
                   "requestLongerTimeout(N), but only as a last resort.";
         this.currentTest.addResult(new testResult(false, msg, "", false));
       }