tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

browser_webconsole_websocket.js (771B)


      1 /* Any copyright is dedicated to the Public Domain.
      2 * http://creativecommons.org/publicdomain/zero/1.0/ */
      3 
      4 "use strict";
      5 
      6 // Check that WebSocket connection failure messages are displayed. See Bug 603750.
      7 
      8 const TEST_URI =
      9  "https://example.com/browser/devtools/client/webconsole/test/browser/test-websocket.html";
     10 
     11 add_task(async function () {
     12  const hud = await openNewTabAndConsole(TEST_URI);
     13  await waitFor(
     14    () => findErrorMessage(hud, "wss://0.0.0.0:81"),
     15    "Did not find error message for wss://0.0.0.0:81 connection",
     16    500
     17  );
     18  await waitFor(
     19    () => findErrorMessage(hud, "wss://0.0.0.0:82"),
     20    "Did not find error message for wss://0.0.0.0:82 connection",
     21    500
     22  );
     23  ok(true, "WebSocket error messages are displayed in the console");
     24 });