Bug 1408948 - enable browser_webconsole_show_subresource_security_errors.js;r=nchevobbe
authorJulian Descottes <jdescottes@mozilla.com>
Thu, 23 Nov 2017 14:55:39 +0100
changeset 393951 b34741ad09ba0c73e982bffd7d88d36bd92dac42
parent 393950 1471cdb78ce9d6b25f078fcbd10b3b9bd0dc7675
child 393952 a431116645e6e3ae61fa62ae77eca746ce88b95f
push id32988
push usertoros@mozilla.com
push dateWed, 29 Nov 2017 00:19:15 +0000
treeherdermozilla-central@cb9092a90f6e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnchevobbe
bugs1408948
milestone59.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1408948 - enable browser_webconsole_show_subresource_security_errors.js;r=nchevobbe MozReview-Commit-ID: Dci3py85zJq
devtools/client/webconsole/new-console-output/test/mochitest/browser.ini
devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_show_subresource_security_errors.js
devtools/client/webconsole/new-console-output/test/mochitest/test-subresource-security-error.html
devtools/client/webconsole/new-console-output/test/mochitest/test-subresource-security-error.js
devtools/client/webconsole/new-console-output/test/mochitest/test-subresource-security-error.js^headers^
devtools/client/webconsole/new-console-output/test/mochitest/test_bug1092055_shouldwarn.html
devtools/client/webconsole/new-console-output/test/mochitest/test_bug1092055_shouldwarn.js
devtools/client/webconsole/new-console-output/test/mochitest/test_bug1092055_shouldwarn.js^headers^
--- a/devtools/client/webconsole/new-console-output/test/mochitest/browser.ini
+++ b/devtools/client/webconsole/new-console-output/test/mochitest/browser.ini
@@ -12,19 +12,16 @@ support-files =
   source-mapped.scss
   test_bug_1010953_cspro.html
   test_bug_1010953_cspro.html^headers^
   test_bug_1247459_violation.html
   test_bug_770099_violation.html
   test_bug_770099_violation.html^headers^
   test_console_csp_ignore_reflected_xss_message.html
   test_console_csp_ignore_reflected_xss_message.html^headers^
-  test_bug1092055_shouldwarn.html
-  test_bug1092055_shouldwarn.js
-  test_bug1092055_shouldwarn.js^headers^
   test_hpkp-invalid-headers.sjs
   test_hsts-invalid-headers.sjs
   test-autocomplete-in-stackframe.html
   test-batching.html
   test-bug_1050691_click_function_to_source.html
   test-bug_1050691_click_function_to_source.js
   test-bug_923281_console_log_filter.html
   test-bug_923281_test1.js
@@ -153,16 +150,19 @@ support-files =
   test-reopen-closed-tab.html
   test-repeated-messages.html
   test-result-format-as-string.html
   test-sourcemap-error-01.html
   test-sourcemap-error-01.js
   test-sourcemap-error-02.html
   test-sourcemap-error-02.js
   test-stacktrace-location-debugger-link.html
+  test-subresource-security-error.html
+  test-subresource-security-error.js
+  test-subresource-security-error.js^headers^
   test-trackingprotection-securityerrors.html
   test-webconsole-error-observer.html
   testscript.js
   !/devtools/client/netmonitor/test/sjs_cors-test-server.sjs
   !/image/test/mochitest/blue.png
   !/devtools/client/framework/test/shared-head.js
   !/devtools/client/netmonitor/test/shared-head.js
 [browser_console.js]
@@ -390,18 +390,16 @@ skip-if = true #	Bug 1403450
 skip-if = true #	Bug 1401942
 [browser_webconsole_script_errordoc_urls.js]
 skip-if = true #	Bug 1403454
 # old console skip-if = e10s # Bug 1042253 - webconsole tests disabled with e10s
 [browser_webconsole_scroll.js]
 [browser_webconsole_select_all.js]
 skip-if = true #	Bug 1404359
 [browser_webconsole_show_subresource_security_errors.js]
-skip-if = true # Bug 1408948
-# old console skip-if = e10s && (os == 'win' || os == 'mac') # Bug 1243987
 [browser_webconsole_shows_reqs_in_netmonitor.js]
 [browser_webconsole_sourcemap_css.js]
 [browser_webconsole_sourcemap_error.js]
 [browser_webconsole_sourcemap_invalid.js]
 [browser_webconsole_sourcemap_nosource.js]
 [browser_webconsole_split.js]
 skip-if = true # Bug 1408949
 [browser_webconsole_split_escape_key.js]
--- a/devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_show_subresource_security_errors.js
+++ b/devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_show_subresource_security_errors.js
@@ -5,29 +5,20 @@
 
 // Ensure non-toplevel security errors are displayed
 
 "use strict";
 
 const TEST_URI = "data:text/html;charset=utf-8,Web Console subresource STS " +
                  "warning test";
 const TEST_DOC = "https://example.com/browser/devtools/client/webconsole/" +
-                 "test/test_bug1092055_shouldwarn.html";
+                 "new-console-output/test/mochitest/test-subresource-security-error.html";
 const SAMPLE_MSG = "specified a header that could not be parsed successfully.";
 
-add_task(function* () {
-  let { browser } = yield loadTab(TEST_URI);
-
-  let hud = yield openConsole();
-
+add_task(async function () {
+  const hud = await openNewTabAndConsole(TEST_URI);
   hud.jsterm.clearOutput();
+  await loadDocument(TEST_DOC);
 
-  let loaded = loadBrowser(browser);
-  BrowserTestUtils.loadURI(browser, TEST_DOC);
-  yield loaded;
+  await waitFor(() => findMessage(hud, SAMPLE_MSG, ".message.warn"));
 
-  yield waitForSuccess({
-    name: "Subresource STS warning displayed successfully",
-    validator: function () {
-      return hud.outputNode.textContent.indexOf(SAMPLE_MSG) > -1;
-    }
-  });
+  ok(true, "non-toplevel security warning message was displayed");
 });
rename from devtools/client/webconsole/new-console-output/test/mochitest/test_bug1092055_shouldwarn.html
rename to devtools/client/webconsole/new-console-output/test/mochitest/test-subresource-security-error.html
--- a/devtools/client/webconsole/new-console-output/test/mochitest/test_bug1092055_shouldwarn.html
+++ b/devtools/client/webconsole/new-console-output/test/mochitest/test-subresource-security-error.html
@@ -1,14 +1,14 @@
 <!DOCTYPE HTML>
 <html>
 <head>
   <meta charset="UTF-8">
   <title>Bug 1092055 - Log console messages for non-top-level security errors</title>
-  <script src="test_bug1092055_shouldwarn.js"></script>
+  <script src="test-subresource-security-error.js"></script>
   <!--
     Any copyright is dedicated to the Public Domain.
     http://creativecommons.org/publicdomain/zero/1.0/
   -->
 </head>
 <body>
 Bug 1092055 - Log console messages for non-top-level security errors
 </body>
rename from devtools/client/webconsole/new-console-output/test/mochitest/test_bug1092055_shouldwarn.js
rename to devtools/client/webconsole/new-console-output/test/mochitest/test-subresource-security-error.js
rename from devtools/client/webconsole/new-console-output/test/mochitest/test_bug1092055_shouldwarn.js^headers^
rename to devtools/client/webconsole/new-console-output/test/mochitest/test-subresource-security-error.js^headers^