Bug 1256833 - Fix eslint issues in devtools/client/webconsole/test/browser_webconsole_bug_589162_css_filter.js. r=pbro, a=test-only
authorBrian Grinstead <bgrinstead@mozilla.com>
Fri, 13 May 2016 07:37:35 -0700
changeset 332929 f4070aee95b2a621597fe86633161f999424f953
parent 332928 68c376956c7527aac587f1589ca2234488e74f14
child 332930 d653d8ceb9982bf414f7e635fded811d69d6eb64
push id6048
push userkmoir@mozilla.com
push dateMon, 06 Jun 2016 19:02:08 +0000
treeherdermozilla-beta@46d72a56c57d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspbro, test-only
bugs1256833
milestone48.0a2
Bug 1256833 - Fix eslint issues in devtools/client/webconsole/test/browser_webconsole_bug_589162_css_filter.js. r=pbro, a=test-only MozReview-Commit-ID: LRbG1muyjqr
devtools/client/webconsole/test/browser_webconsole_bug_589162_css_filter.js
--- a/devtools/client/webconsole/test/browser_webconsole_bug_589162_css_filter.js
+++ b/devtools/client/webconsole/test/browser_webconsole_bug_589162_css_filter.js
@@ -7,37 +7,33 @@
 
 const TEST_URI = "data:text/html;charset=utf-8,<div style='font-size:3em;" +
                  "foobarCssParser:baz'>test CSS parser filter</div>";
 
 /**
  * Unit test for bug 589162:
  * CSS filtering on the console does not work
  */
-function test() {
-  Task.spawn(runner).then(finishTest);
+add_task(function* () {
+  let {tab} = yield loadTab(TEST_URI);
+  let hud = yield openConsole(tab);
 
-  function* runner() {
-    let {tab} = yield loadTab(TEST_URI);
-    let hud = yield openConsole(tab);
+  // CSS warnings are disabled by default.
+  hud.setFilterState("cssparser", true);
+  hud.jsterm.clearOutput();
 
-    // CSS warnings are disabled by default.
-    hud.setFilterState("cssparser", true);
-    hud.jsterm.clearOutput();
-
-    content.location.reload();
+  BrowserReload();
 
-    yield waitForMessages({
-      webconsole: hud,
-      messages: [{
-        text: "foobarCssParser",
-        category: CATEGORY_CSS,
-        severity: SEVERITY_WARNING,
-      }],
-    });
+  yield waitForMessages({
+    webconsole: hud,
+    messages: [{
+      text: "foobarCssParser",
+      category: CATEGORY_CSS,
+      severity: SEVERITY_WARNING,
+    }],
+  });
 
-    hud.setFilterState("cssparser", false);
+  hud.setFilterState("cssparser", false);
 
-    let msg = "the unknown CSS property warning is not displayed, " +
-              "after filtering";
-    testLogEntry(hud.outputNode, "foobarCssParser", msg, true, true);
-  }
-}
+  let msg = "the unknown CSS property warning is not displayed, " +
+            "after filtering";
+  testLogEntry(hud.outputNode, "foobarCssParser", msg, true, true);
+});