Bug 1256792 - [ESLint] Fix ESLint issues in devtools/client/webconsole/test/browser_console_nsiconsolemessage.js. r=linclark, a=test-only
authorMichael Kohler <mkohler@picobudget.com>
Tue, 03 May 2016 16:04:00 -0400
changeset 379377 9e979bdaa8f5382d8de8143691a51e851bc880df
parent 379376 250fe675e32f353b92ef36e19e3b5286bbc868db
child 379378 c443cfd5fb7c900507a93ff67b5a35370db17b05
push id21011
push usermak77@bonardo.net
push dateThu, 16 Jun 2016 13:40:45 +0000
reviewerslinclark, test-only
bugs1256792
milestone48.0a2
Bug 1256792 - [ESLint] Fix ESLint issues in devtools/client/webconsole/test/browser_console_nsiconsolemessage.js. r=linclark, a=test-only
devtools/client/webconsole/test/browser_console_nsiconsolemessage.js
--- a/devtools/client/webconsole/test/browser_console_nsiconsolemessage.js
+++ b/devtools/client/webconsole/test/browser_console_nsiconsolemessage.js
@@ -14,28 +14,31 @@ const TEST_URI = "data:text/html;charset
 function test() {
   const FILTER_PREF = "devtools.browserconsole.filter.jslog";
   Services.prefs.setBoolPref(FILTER_PREF, true);
 
   registerCleanupFunction(() => {
     Services.prefs.clearUserPref(FILTER_PREF);
   });
 
-  Task.spawn(function*() {
+  Task.spawn(function* () {
     const {tab} = yield loadTab(TEST_URI);
 
     // Test for cached nsIConsoleMessages.
     Services.console.logStringMessage("test1 for bug859756");
 
     info("open web console");
     let hud = yield openConsole(tab);
 
     ok(hud, "web console opened");
     Services.console.logStringMessage("do-not-show-me");
-    content.console.log("foobarz");
+
+    ContentTask.spawn(gBrowser.selectedBrowser, null, function* () {
+      content.console.log("foobarz");
+    });
 
     yield waitForMessages({
       webconsole: hud,
       messages: [{
         text: "foobarz",
         category: CATEGORY_WEBDEV,
         severity: SEVERITY_LOG,
       }],