michael@0: /* vim:set ts=2 sw=2 sts=2 et: */ michael@0: /* ***** BEGIN LICENSE BLOCK ***** michael@0: * Any copyright is dedicated to the Public Domain. michael@0: * http://creativecommons.org/publicdomain/zero/1.0/ michael@0: * michael@0: * Contributor(s): michael@0: * Mihai Șucan michael@0: * michael@0: * ***** END LICENSE BLOCK ***** */ michael@0: michael@0: const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test/test-bug-603750-websocket.html"; michael@0: michael@0: function test() { michael@0: addTab("data:text/html;charset=utf-8,Web Console test for bug 603750: Web Socket errors"); michael@0: browser.addEventListener("load", function tabLoad() { michael@0: browser.removeEventListener("load", tabLoad, true); michael@0: openConsole(null, (hud) => { michael@0: content.location = TEST_URI; michael@0: info("waiting for websocket errors"); michael@0: waitForMessages({ michael@0: webconsole: hud, michael@0: messages: [ michael@0: { michael@0: text: "ws://0.0.0.0:81", michael@0: source: { url: "test-bug-603750-websocket.js" }, michael@0: category: CATEGORY_JS, michael@0: severity: SEVERITY_ERROR, michael@0: }, michael@0: { michael@0: text: "ws://0.0.0.0:82", michael@0: source: { url: "test-bug-603750-websocket.js" }, michael@0: category: CATEGORY_JS, michael@0: severity: SEVERITY_ERROR, michael@0: }, michael@0: ]}).then(finishTest); michael@0: }); michael@0: }, true); michael@0: } michael@0: