tor-browser

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

browser_dbg-log-points-workers.js (895B)


      1 /* This Source Code Form is subject to the terms of the Mozilla Public
      2 * License, v. 2.0. If a copy of the MPL was not distributed with this
      3 * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
      4 
      5 /*
      6 * Tests that log points in a worker are correctly logged to the console
      7 */
      8 
      9 "use strict";
     10 
     11 add_task(async function () {
     12  Services.prefs.setBoolPref("devtools.toolbox.splitconsole.open", true);
     13 
     14  const dbg = await initDebugger("doc-windowless-workers.html");
     15 
     16  await waitForSource(dbg, "simple-worker.js");
     17  await selectSource(dbg, "simple-worker.js");
     18 
     19  await altClickElement(dbg, "gutterElement", 4);
     20  await waitForBreakpoint(dbg, "simple-worker.js", 4);
     21 
     22  await getDebuggerSplitConsole(dbg);
     23  await hasConsoleMessage(dbg, "timer");
     24  await waitForConsoleMessageLink(dbg.toolbox, "timer", "simple-worker.js:4:9");
     25  ok(true, "message includes the url and linenumber");
     26 });