Bug 889847 - Fix for intermittent browser_webconsole_bug_613013_console_api_iframe.js | Timed out while waiting for: console.log() message; r=me
authorMihai Sucan <mihai.sucan@gmail.com>
Tue, 16 Jul 2013 22:25:07 +0300
changeset 138745 eb9dcbb4b46d860fbabb775bbd54b54584bcf120
parent 138744 e1536ff0cb92585361c3f8f26b64e2dcdcfe77ba
child 138746 0960402d8145e0442bf08d5bb8d19cd09d75227b
push idunknown
push userunknown
push dateunknown
reviewersme
bugs889847
milestone25.0a1
Bug 889847 - Fix for intermittent browser_webconsole_bug_613013_console_api_iframe.js | Timed out while waiting for: console.log() message; r=me
browser/devtools/webconsole/test/browser_webconsole_bug_613013_console_api_iframe.js
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_613013_console_api_iframe.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_613013_console_api_iframe.js
@@ -30,24 +30,23 @@ function tabLoad(aEvent) {
     content.location.reload();
   });
 }
 
 function performTest() {
   Services.obs.removeObserver(TestObserver, "console-api-log-event");
   TestObserver = null;
 
-  waitForSuccess({
-    name: "console.log() message",
-    validatorFn: function()
-    {
-      return hud.outputNode.textContent.indexOf("foobarBug613013") > -1;
-    },
-    successFn: finishTest,
-    failureFn: finishTest,
-  });
+  waitForMessages({
+    webconsole: hud,
+    messages: [{
+      text: "foobarBug613013",
+      category: CATEGORY_WEBDEV,
+      severity: SEVERITY_LOG,
+    }],
+  }).then(finishTest);
 }
 
 function test() {
   addTab(TEST_URI);
   browser.addEventListener("load", tabLoad, true);
 }