Bug 1408950 - Enable browser_webconsole_websocket.js in the new console frontend. r=nchevobbe
authorMike Park <mikeparkms@gmail.com>
Tue, 21 Nov 2017 14:25:23 -0500
changeset 449524 9b7b27dd0cefc6c9539966127eec2a91610a5c7d
parent 449523 e3512368ff7a1d5c3c2fa395aa0aea84efa3e63e
child 449525 95704f0aec0cf50666ded74c8c504ff2917c59c0
push id8527
push userCallek@gmail.com
push dateThu, 11 Jan 2018 21:05:50 +0000
treeherdermozilla-beta@95342d212a7a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnchevobbe
bugs1408950
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 1408950 - Enable browser_webconsole_websocket.js in the new console frontend. r=nchevobbe MozReview-Commit-ID: K0wKsAPmXxP
devtools/client/webconsole/new-console-output/test/mochitest/browser.ini
devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_websocket.js
devtools/client/webconsole/new-console-output/test/mochitest/test-bug-603750-websocket.html
devtools/client/webconsole/new-console-output/test/mochitest/test-bug-603750-websocket.js
devtools/client/webconsole/new-console-output/test/mochitest/test-websocket.html
devtools/client/webconsole/new-console-output/test/mochitest/test-websocket.js
--- a/devtools/client/webconsole/new-console-output/test/mochitest/browser.ini
+++ b/devtools/client/webconsole/new-console-output/test/mochitest/browser.ini
@@ -44,18 +44,16 @@ support-files =
   test-bug-595934-malformedxml-external.xml
   test-bug-595934-malformedxml.xhtml
   test-bug-595934-svg.xhtml
   test-bug-595934-workers.html
   test-bug-595934-workers.js
   test-bug-599725-response-headers.sjs
   test-bug-601177-log-levels.html
   test-bug-601177-log-levels.js
-  test-bug-603750-websocket.html
-  test-bug-603750-websocket.js
   test-bug-630733-response-redirect-headers.sjs
   test-bug-632275-getters.html
   test-bug-632347-iterators-generators.html
   test-bug-644419-log-limits.html
   test-bug-646025-console-file-location.html
   test-bug-658368-time-methods.html
   test-bug-737873-mixedcontent.html
   test-bug-752559-ineffective-iframe-sandbox-warning-inner.html
@@ -156,16 +154,18 @@ support-files =
   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
+  test-websocket.html
+  test-websocket.js
   testscript.js
   !/devtools/client/netmonitor/test/sjs_cors-test-server.sjs
   !/image/test/mochitest/blue.png
   !/devtools/client/framework/test/shared-head.js
 [browser_console.js]
 skip-if = true # Bug 1406060
 [browser_console_addonsdk_loader_exception.js]
 skip-if = true # Bug 1406060
@@ -411,9 +411,8 @@ skip-if = true #	Bug 1403200
 skip-if = true #	Bug 1403205
 [browser_webconsole_view_source.js]
 [browser_webconsole_violation.js]
 skip-if = true #	Bug 1405245
 # old console skip-if = e10s && (os == 'win') # Bug 1264955
 [browser_webconsole_visibility_messages.js]
 [browser_webconsole_warn_about_replaced_api.js]
 [browser_webconsole_websocket.js]
-skip-if = true # Bug 1408950
--- a/devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_websocket.js
+++ b/devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_websocket.js
@@ -1,39 +1,23 @@
 /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* vim: set ft=javascript ts=2 et sw=2 tw=80: */
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
 "use strict";
 
-// See Bug 603750.
+// Check that WebSocket connection failure messages are displayed. See Bug 603750.
 
 const TEST_URI = "http://example.com/browser/devtools/client/webconsole/" +
-                 "test/test-bug-603750-websocket.html";
+                 "new-console-output/test/mochitest/test-websocket.html";
 const TEST_URI2 = "data:text/html;charset=utf-8,Web Console test for " +
                   "bug 603750: Web Socket errors";
 
-add_task(function* () {
-  yield loadTab(TEST_URI2);
-
-  let hud = yield openConsole();
+add_task(async function () {
+  const hud = await openNewTabAndConsole(TEST_URI2);
 
   BrowserTestUtils.loadURI(gBrowser.selectedBrowser, TEST_URI);
 
-  yield waitForMessages({
-    webconsole: hud,
-    messages: [
-      {
-        text: "ws://0.0.0.0:81",
-        source: { url: "test-bug-603750-websocket.js" },
-        category: CATEGORY_JS,
-        severity: SEVERITY_ERROR,
-      },
-      {
-        text: "ws://0.0.0.0:82",
-        source: { url: "test-bug-603750-websocket.js" },
-        category: CATEGORY_JS,
-        severity: SEVERITY_ERROR,
-      },
-    ]
-  });
+  await waitFor(() => findMessage(hud, "ws://0.0.0.0:81"));
+  await waitFor(() => findMessage(hud, "ws://0.0.0.0:82"));
+  ok(true, "WebSocket error messages are displayed in the console");
 });
rename from devtools/client/webconsole/new-console-output/test/mochitest/test-bug-603750-websocket.html
rename to devtools/client/webconsole/new-console-output/test/mochitest/test-websocket.html
--- a/devtools/client/webconsole/new-console-output/test/mochitest/test-bug-603750-websocket.html
+++ b/devtools/client/webconsole/new-console-output/test/mochitest/test-websocket.html
@@ -1,14 +1,14 @@
 <!DOCTYPE html>
 <html lang="en">
   <head>
     <meta charset="utf-8">
-    <title>Web Console test for bug 603750 - Web Socket errors</title>
+    <title>Web Console test for Web Socket errors</title>
     <!-- Any copyright is dedicated to the Public Domain.
          http://creativecommons.org/publicdomain/zero/1.0/ -->
   </head>
   <body>
-    <p>Web Console test for bug 595934 - Web Socket errors.</p>
+    <p>Web Console test for Web Socket errors.</p>
     <iframe srcdoc="hello world!"></iframe>
-    <script type="text/javascript" src="test-bug-603750-websocket.js"></script>
+    <script type="text/javascript" src="test-websocket.js"></script>
   </body>
 </html>
rename from devtools/client/webconsole/new-console-output/test/mochitest/test-bug-603750-websocket.js
rename to devtools/client/webconsole/new-console-output/test/mochitest/test-websocket.js