browser/devtools/webconsole/test/browser_webconsole_bug_603750_websocket.js

changeset 0
6474c204b198
equal deleted inserted replaced
-1:000000000000 0:b5f2e6137d66
1 /* vim:set ts=2 sw=2 sts=2 et: */
2 /* ***** BEGIN LICENSE BLOCK *****
3 * Any copyright is dedicated to the Public Domain.
4 * http://creativecommons.org/publicdomain/zero/1.0/
5 *
6 * Contributor(s):
7 * Mihai Șucan <mihai.sucan@gmail.com>
8 *
9 * ***** END LICENSE BLOCK ***** */
10
11 const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test/test-bug-603750-websocket.html";
12
13 function test() {
14 addTab("data:text/html;charset=utf-8,Web Console test for bug 603750: Web Socket errors");
15 browser.addEventListener("load", function tabLoad() {
16 browser.removeEventListener("load", tabLoad, true);
17 openConsole(null, (hud) => {
18 content.location = TEST_URI;
19 info("waiting for websocket errors");
20 waitForMessages({
21 webconsole: hud,
22 messages: [
23 {
24 text: "ws://0.0.0.0:81",
25 source: { url: "test-bug-603750-websocket.js" },
26 category: CATEGORY_JS,
27 severity: SEVERITY_ERROR,
28 },
29 {
30 text: "ws://0.0.0.0:82",
31 source: { url: "test-bug-603750-websocket.js" },
32 category: CATEGORY_JS,
33 severity: SEVERITY_ERROR,
34 },
35 ]}).then(finishTest);
36 });
37 }, true);
38 }
39

mercurial