Bug 984857 - Fix for intermittent browser_webconsole_output_02.js,browser_webconsole_output_03.js | This test exceeded the timeout threshold. a=test-only
authorMihai Sucan <mihai.sucan@gmail.com>
Tue, 25 Mar 2014 15:18:58 +0200
changeset 192351 61a02b9640fef32b6246186a9a6ba0ba87217ed4
parent 192350 0aba36b451a12f4119c6a754729b1888f034316f
child 192352 63835526742f5c46e079fea87b11d33a42eada28
push id474
push userasasaki@mozilla.com
push dateMon, 02 Jun 2014 21:01:02 +0000
treeherdermozilla-release@967f4cf1b31c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstest-only
bugs984857
milestone30.0a2
Bug 984857 - Fix for intermittent browser_webconsole_output_02.js,browser_webconsole_output_03.js | This test exceeded the timeout threshold. a=test-only
browser/devtools/webconsole/test/browser_webconsole_output_02.js
browser/devtools/webconsole/test/browser_webconsole_output_03.js
--- a/browser/devtools/webconsole/test/browser_webconsole_output_02.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_output_02.js
@@ -145,17 +145,16 @@ let inputTests = [
     output: 'Map { a: "b", HTMLCollection[2]: Object, Map[3]: Set[9] }',
     printOutput: "[object Map]",
     inspectable: true,
     variablesViewLabel: "Map[3]",
   },
 ];
 
 function test() {
-
-  addTab(TEST_URI);
-  browser.addEventListener("load", function onLoad() {
-    browser.removeEventListener("load", onLoad, true);
-    openConsole().then((hud) => {
-      return checkOutputForInputs(hud, inputTests);
-    }).then(finishTest);
-  }, true);
+  requestLongerTimeout(2);
+  Task.spawn(function*() {
+    const {tab} = yield loadTab(TEST_URI);
+    const hud = yield openConsole(tab);
+    yield checkOutputForInputs(hud, inputTests);
+    inputTests = null;
+  }).then(finishTest);
 }
--- a/browser/devtools/webconsole/test/browser_webconsole_output_03.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_output_03.js
@@ -148,22 +148,16 @@ let inputTests = [
     output: 'class="test1 tezt2"',
     printOutput: "[object Attr]",
     inspectable: true,
     variablesViewLabel: 'class="test1 tezt2"',
   },
 ];
 
 function test() {
-  addTab(TEST_URI);
-  browser.addEventListener("load", function onLoad() {
-    browser.removeEventListener("load", onLoad, true);
-    openConsole().then((hud) => {
-      return checkOutputForInputs(hud, inputTests);
-    }).then(finishUp);
-  }, true);
+  requestLongerTimeout(2);
+  Task.spawn(function*() {
+    const {tab} = yield loadTab(TEST_URI);
+    const hud = yield openConsole(tab);
+    yield checkOutputForInputs(hud, inputTests);
+    inputTests = null;
+  }).then(finishTest);
 }
-
-function finishUp() {
-  inputTests = null;
-
-  finishTest();
-}