tor-browser

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

browser_dbg-sourcemaps-breakpoints.js (1063B)


      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 // Tests setting breakpoints in an original file and
      6 // removing it in the generated file.
      7 
      8 "use strict";
      9 
     10 requestLongerTimeout(2);
     11 
     12 add_task(async function () {
     13  // NOTE: the CORS call makes the test run times inconsistent
     14  const dbg = await initDebugger("doc-sourcemaps.html", "entry.js");
     15 
     16  ok(true, "Original sources exist");
     17 
     18  await selectSource(dbg, "entry.js");
     19 
     20  await clickGutter(dbg, 9);
     21  await waitForBreakpointCount(dbg, 1);
     22  await assertBreakpoint(dbg, 9);
     23  assertBreakpointSnippet(dbg, 3, "output(times2(3));");
     24 
     25  await selectSource(dbg, "bundle.js");
     26  await assertBreakpoint(dbg, 55);
     27  assertBreakpointSnippet(dbg, 3, "output(times2(3));");
     28 
     29  await clickGutter(dbg, 55);
     30  await waitForBreakpointCount(dbg, 0);
     31  await assertNoBreakpoint(dbg, 55);
     32 
     33  await selectSource(dbg, "entry.js");
     34  await assertNoBreakpoint(dbg, 9);
     35 });