Bug 907332 - Intermittent browser_webconsole_bug_594477_clickable_output.js | Timed out while waiting for: network message displayed. r=me, a=test-only
authorMihai Sucan <mihai.sucan@gmail.com>
Thu, 05 Sep 2013 22:14:02 +0300
changeset 153981 e14cf8779ce3240293b3244055f324b27d7ec0ee
parent 153980 72398fa24effb44c3daa10918982616fe64f73e5
child 153982 a6d32f0d414736a2e3c1272bbd24881be420d2be
push id2859
push userakeybl@mozilla.com
push dateMon, 16 Sep 2013 19:14:59 +0000
treeherdermozilla-beta@87d3c51cd2bf [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme, test-only
bugs907332
milestone25.0a2
Bug 907332 - Intermittent browser_webconsole_bug_594477_clickable_output.js | Timed out while waiting for: network message displayed. r=me, a=test-only
browser/devtools/webconsole/test/browser_webconsole_bug_594477_clickable_output.js
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_594477_clickable_output.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_594477_clickable_output.js
@@ -22,32 +22,32 @@ function consoleOpened(aHud) {
 
   // Reload so we get some output in the console.
   browser.contentWindow.location.reload();
 }
 
 function tabLoad2(aEvent) {
   browser.removeEventListener(aEvent.type, tabLoad2, true);
 
-  waitForSuccess({
-    name: "network message displayed",
-    validatorFn: function()
-    {
-      return outputNode.querySelector(".hud-networkinfo .hud-clickable");
-    },
-    successFn: function() {
-      outputItem = outputNode.querySelector(".hud-networkinfo .hud-clickable");
-      ok(outputItem, "found a network message");
-      document.addEventListener("popupshown", networkPanelShown, false);
+  waitForMessages({
+    webconsole: HUD,
+    messages: [{
+      text: "test-console.html",
+      category: CATEGORY_NETWORK,
+      severity: SEVERITY_LOG,
+    }],
+  }).then(([result]) => {
+    let msg = [...result.matched][0];
+    outputItem = msg.querySelector(".hud-clickable");
+    ok(outputItem, "found a network message");
+    document.addEventListener("popupshown", networkPanelShown, false);
 
-      // Send the mousedown and click events such that the network panel opens.
-      EventUtils.sendMouseEvent({type: "mousedown"}, outputItem);
-      EventUtils.sendMouseEvent({type: "click"}, outputItem);
-    },
-    failureFn: finishTest,
+    // Send the mousedown and click events such that the network panel opens.
+    EventUtils.sendMouseEvent({type: "mousedown"}, outputItem);
+    EventUtils.sendMouseEvent({type: "click"}, outputItem);
   });
 }
 
 function networkPanelShown(aEvent) {
   document.removeEventListener(aEvent.type, networkPanelShown, false);
 
   info("networkPanelShown");