Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
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 ***** */
11 const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test/test-bug-603750-websocket.html";
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 }