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