Bug 1322645. Fix intermittent test timeout by making sure our prefs are set before we start doing parts of the test. r=jmaher, a=test-only
authorBoris Zbarsky <bzbarsky@mit.edu>
Thu, 21 Mar 2019 13:56:05 +0000
changeset 525767 af215de02eec43c188bcbe7b3589b39dbefedd1d
parent 525766 01fc4edd840ae80b5819054861d3e3e727162d4c
child 525768 086a215d4caadb457a629887524907149cde1c4d
push id2032
push userffxbld-merge
push dateMon, 13 May 2019 09:36:57 +0000
treeherdermozilla-release@455c1065dcbe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjmaher, test-only
bugs1322645
milestone67.0
Bug 1322645. Fix intermittent test timeout by making sure our prefs are set before we start doing parts of the test. r=jmaher, a=test-only Differential Revision: https://phabricator.services.mozilla.com/D24307
dom/xul/test/test_bug757137.xul
--- a/dom/xul/test/test_bug757137.xul
+++ b/dom/xul/test/test_bug757137.xul
@@ -12,23 +12,22 @@
 </body>
 
 <script>
 SimpleTest.waitForExplicitFinish();
 
 // Force off out-of-process mozbrowser because we need to grab its
 // |window| synchronously from here.  Out-of-process docshell creation
 // for mozbrowser haves entirely differently.
-// XXX why doesn't pushPrefEnv() work here?
-var otherWindow = window.open("window_bug757137.xul", "", "chrome");
-ok(otherWindow.isChromeWindow, 'XUL window should be a ChromeWindow');
-
 SpecialPowers.pushPrefEnv({"set":[["dom.ipc.tabs.disabled", true]]}, startTest);
 
 function startTest() {
+  var otherWindow = window.open("window_bug757137.xul", "", "chrome");
+  ok(otherWindow.isChromeWindow, 'XUL window should be a ChromeWindow');
+
   otherWindow.onload = function () {
     var w = otherWindow.document.getElementById('f').contentWindow;
     ok(w !== null, 'got the |window| for a mozbrowser iframe');
     ok(!w.isChromeWindow, 'mozbrowser iframe should not be a ChromeWindow');
 
     otherWindow.close();
     SimpleTest.waitForFocus(SimpleTest.finish);
  };