Bug 863943 - Fix for intermittent browser_webconsole_bug_602572_log_bodies_checkbox.js | Test timed out; r=me
authorMihai Sucan <mihai.sucan@gmail.com>
Tue, 30 Apr 2013 20:40:27 +0300
changeset 141311 c86dd4f23da5e68f6cfafe1ddb3485ec5cce6296
parent 141310 e5eb454afdbfe86c29b851e852d79a3f65a8aed5
child 141312 7ea794cb249ff2fa7e9d476bb4188a4c548c1c08
push id2579
push userakeybl@mozilla.com
push dateMon, 24 Jun 2013 18:52:47 +0000
treeherdermozilla-beta@b69b7de8a05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme
bugs863943
milestone23.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 863943 - Fix for intermittent browser_webconsole_bug_602572_log_bodies_checkbox.js | Test timed out; r=me
browser/devtools/webconsole/test/browser_webconsole_bug_602572_log_bodies_checkbox.js
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_602572_log_bodies_checkbox.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_602572_log_bodies_checkbox.js
@@ -14,41 +14,39 @@ function test()
 {
   // open tab 1
   addTab("data:text/html;charset=utf-8,Web Console test for bug 602572: log bodies checkbox. tab 1");
   tabs.push(tab);
 
   browser.addEventListener("load", function onLoad1(aEvent) {
     browser.removeEventListener(aEvent.type, onLoad1, true);
 
-    openConsole(null, function(aHud) {
-      info("iframe1 root height " + aHud.ui.rootElement.clientHeight);
+    openConsole(null, (hud) => hud.iframeWindow.mozRequestAnimationFrame(() => {
+      info("iframe1 root height " + hud.ui.rootElement.clientHeight);
 
       // open tab 2
       addTab("data:text/html;charset=utf-8,Web Console test for bug 602572: log bodies checkbox. tab 2");
       tabs.push(tab);
 
       browser.addEventListener("load", function onLoad2(aEvent) {
         browser.removeEventListener(aEvent.type, onLoad2, true);
 
-        openConsole(null, function(aHud) {
-          info("iframe2 root height " + aHud.ui.rootElement.clientHeight);
-          waitForFocus(startTest, aHud.iframeWindow);
-        });
+        openConsole(null, (hud) => hud.iframeWindow.mozRequestAnimationFrame(startTest));
       }, true);
-    });
+    }));
   }, true);
 }
 
 function startTest()
 {
   // Find the relevant elements in the Web Console of tab 2.
   let win2 = tabs[runCount*2 + 1].linkedBrowser.contentWindow;
   let hudId2 = HUDService.getHudIdByWindow(win2);
   huds[1] = HUDService.hudReferences[hudId2];
+  info("startTest: iframe2 root height " + huds[1].ui.rootElement.clientHeight);
 
   if (runCount == 0) {
     menuitems[1] = huds[1].ui.rootElement.querySelector("#saveBodies");
   }
   else {
     menuitems[1] = huds[1].ui.rootElement.querySelector("#saveBodiesContextMenu");
   }
   menupopups[1] = menuitems[1].parentNode;