Bug 1452143: Don't test content CSS error reporting in the browser console. r?jryans draft
authorEmilio Cobos Álvarez <emilio@crisal.io>
Mon, 16 Apr 2018 16:29:38 +0200
changeset 783200 918ad41d9e7b746936a67e46c6fce0360a033466
parent 783199 3af529f5fb4efb1f86d577df04ccff1b88c11fcc
child 783201 82c79bf5f40d641a703ed968c74e59213a5cf458
push id106640
push userbmo:emilio@crisal.io
push dateMon, 16 Apr 2018 19:43:11 +0000
reviewersjryans
bugs1452143
milestone61.0a1
Bug 1452143: Don't test content CSS error reporting in the browser console. r?jryans The browser console doesn't enable the cssErrorReportingEnabled bit on the content process remote windows, and making it work seems non-trivial and kinda useless per the firefox-dev@ discussions. So just remove this test. MozReview-Commit-ID: GMGuQC7YNof
devtools/client/webconsole/test/mochitest/browser_console_error_source_click.js
--- a/devtools/client/webconsole/test/mochitest/browser_console_error_source_click.js
+++ b/devtools/client/webconsole/test/mochitest/browser_console_error_source_click.js
@@ -4,46 +4,38 @@
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
 // Check that JS errors and CSS warnings open view source when their source link
 // is clicked in the Browser Console.
 
 "use strict";
 
 const TEST_URI = "data:text/html;charset=utf8,<p>hello world" +
-                 "<button onclick='foobar.explode()' " +
-                 "style='test-color: green-please'>click!</button>";
+                 "<button onclick='foobar.explode()'>click!</button>";
 
 add_task(async function() {
   await addTab(TEST_URI);
+
   let hud = await HUDService.toggleBrowserConsole();
   ok(hud, "browser console opened");
 
-  // Enable CSS warnings and errors.
-  await setFilterState(hud, {
-    css: true
-  });
-
   // On e10s, the exception is triggered in child process
   // and is ignored by test harness
   if (!Services.appinfo.browserTabsRemoteAutostart) {
     expectUncaughtException();
   }
 
   info("generate exception and wait for the message");
   ContentTask.spawn(gBrowser.selectedBrowser, {}, () => {
     let button = content.document.querySelector("button");
     button.click();
   });
 
   await waitForMessageAndViewSource(hud,
     "ReferenceError: foobar is not defined");
-  await waitForMessageAndViewSource(hud,
-    "Unknown property \u2018test-color\u2019.");
-  await resetFilters(hud);
 });
 
 async function waitForMessageAndViewSource(hud, message) {
   let msg = await waitFor(() => findMessage(hud, message));
   ok(msg, `Message found: "${message}"`);
 
   let locationNode = msg.querySelector(".message-location .frame-link-source");
   ok(locationNode, "Message location link element found");