tor-browser

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

browser_dbg-fission-frame-pause-exceptions.js (1476B)


      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 "use strict";
      6 
      7 const TEST_COM_URI = `${URL_ROOT_COM_SSL}examples/doc_dbg-fission-pause-exceptions.html`;
      8 // Tests Pause on exceptions in remote iframes
      9 
     10 add_task(async function () {
     11  // Load a test page with a remote iframe
     12  const dbg = await initDebuggerWithAbsoluteURL(TEST_COM_URI);
     13 
     14  info("Test pause on exceptions ignoring caught exceptions");
     15  await togglePauseOnExceptions(dbg, true, false);
     16 
     17  let onReloaded = reload(dbg);
     18  await waitForPaused(dbg);
     19 
     20  await assertPausedAtSourceAndLine(
     21    dbg,
     22    findSource(dbg, "doc_dbg-fission-frame-pause-exceptions.html").id,
     23    17
     24  );
     25 
     26  await resume(dbg);
     27  info("Wait for reload to complete after resume");
     28  await onReloaded;
     29 
     30  info("Test pause on exceptions including caught exceptions");
     31  await togglePauseOnExceptions(dbg, true, true);
     32 
     33  onReloaded = reload(dbg);
     34  await waitForPaused(dbg);
     35 
     36  await assertPausedAtSourceAndLine(
     37    dbg,
     38    findSource(dbg, "doc_dbg-fission-frame-pause-exceptions.html").id,
     39    13
     40  );
     41 
     42  await resume(dbg);
     43  await waitForPaused(dbg);
     44 
     45  await assertPausedAtSourceAndLine(
     46    dbg,
     47    findSource(dbg, "doc_dbg-fission-frame-pause-exceptions.html").id,
     48    17
     49  );
     50 
     51  await resume(dbg);
     52  info("Wait for reload to complete after resume");
     53  await onReloaded;
     54 });