summaryrefslogtreecommitdiffstats
path: root/devtools/client/webconsole/test/browser/browser_webconsole_sourcemap_error.js
blob: 46428c7078284a7b197f6f9e28ade3ece8408d9b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/* Any copyright is dedicated to the Public Domain.
 * http://creativecommons.org/publicdomain/zero/1.0/ */

"use strict";

// Test that a missing source map is reported.

const BASE =
  "http://example.com/browser/devtools/client/webconsole/" + "test/browser/";

add_task(async function () {
  for (const test of [
    "test-sourcemap-error-01.html",
    "test-sourcemap-error-02.html",
  ]) {
    const hud = await openNewTabAndConsole(BASE + test);

    const node = await waitFor(() => findConsoleAPIMessage(hud, "here"));
    ok(node, "logged text is displayed in web console");

    const node2 = await waitFor(() =>
      findWarningMessage(hud, "Source map error")
    );
    ok(node2, "source map error is displayed in web console");
  }
});