tor-browser

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

browser_dbg-worker-exception.js (865B)


      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 // Test that we can pause on exceptions early in newly created workers.
      6 
      7 "use strict";
      8 
      9 add_task(async function () {
     10  const dbg = await initDebugger("doc-worker-exception.html");
     11 
     12  await togglePauseOnExceptions(dbg, true, false);
     13 
     14  invokeInTab("startWorker");
     15  invokeInTab("messageWorker");
     16 
     17  info("Test pause on exceptions on worker load");
     18  await waitForPaused(dbg);
     19  const source = findSource(dbg, "worker-exception.js");
     20  await assertPausedAtSourceAndLine(dbg, source.id, 4);
     21 
     22  await resume(dbg);
     23  info("Test pause on exceptions on worker postMessage ");
     24  await waitForPaused(dbg);
     25  await assertPausedAtSourceAndLine(dbg, source.id, 2);
     26 });