Bug 1408950 - Enable browser_webconsole_websocket.js in the new console frontend. r=nchevobbe

MozReview-Commit-ID: K0wKsAPmXxP

--HG--
rename : devtools/client/webconsole/new-console-output/test/mochitest/test-bug-603750-websocket.html => devtools/client/webconsole/new-console-output/test/mochitest/test-websocket.html
rename : devtools/client/webconsole/new-console-output/test/mochitest/test-bug-603750-websocket.js => devtools/client/webconsole/new-console-output/test/mochitest/test-websocket.js
extra : rebase_source : 942247eb82006d428d4dd4573154c767f4a72ea8
This commit is contained in:
Mike Park 2017-11-21 14:25:23 -05:00
parent f3285c9019
commit 8fcfc68bd1
4 changed files with 12 additions and 29 deletions

View File

@ -49,8 +49,6 @@ support-files =
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
@ -161,6 +159,8 @@ support-files =
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
@ -416,4 +416,3 @@ skip-if = true # Bug 1405245
[browser_webconsole_visibility_messages.js]
[browser_webconsole_warn_about_replaced_api.js]
[browser_webconsole_websocket.js]
skip-if = true # Bug 1408950

View File

@ -5,35 +5,19 @@
"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");
});

View File

@ -2,13 +2,13 @@
<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>