tor-browser

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

browser_webconsole_sourcemap_error.js (751B)


      1 /* Any copyright is dedicated to the Public Domain.
      2 * http://creativecommons.org/publicdomain/zero/1.0/ */
      3 
      4 "use strict";
      5 
      6 // Test that a missing source map is reported.
      7 
      8 const BASE =
      9  "http://example.com/browser/devtools/client/webconsole/" + "test/browser/";
     10 
     11 add_task(async function () {
     12  for (const test of [
     13    "test-sourcemap-error-01.html",
     14    "test-sourcemap-error-02.html",
     15  ]) {
     16    const hud = await openNewTabAndConsole(BASE + test);
     17 
     18    const node = await waitFor(() => findConsoleAPIMessage(hud, "here"));
     19    ok(node, "logged text is displayed in web console");
     20 
     21    const node2 = await waitFor(() =>
     22      findWarningMessage(hud, "Source map error")
     23    );
     24    ok(node2, "source map error is displayed in web console");
     25  }
     26 });