tor-browser

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

browser_dbg-preview-source-maps.js (1157B)


      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 add_task(async function () {
      8  const dbg = await initDebugger(
      9    "doc-sourcemaps.html",
     10    "entry.js",
     11    "output.js",
     12    "times2.js",
     13    "opts.js"
     14  );
     15 
     16  await selectSource(dbg, "times2.js");
     17  await addBreakpoint(dbg, "times2.js", 2);
     18 
     19  invokeInTab("keepMeAlive");
     20  await waitForPausedInOriginalFileAndToggleMapScopes(dbg, "times2.js");
     21 
     22  info("Test previewing in the original location");
     23  await assertPreviews(dbg, [
     24    { line: 2, column: 10, result: 4, expression: "x" },
     25  ]);
     26 
     27  info("Test previewing in the generated location");
     28  await dbg.actions.jumpToMappedSelectedLocation();
     29  await waitForSelectedSource(dbg, "bundle.js");
     30  await assertPreviews(dbg, [
     31    { line: 70, column: 11, result: 4, expression: "x" },
     32  ]);
     33 
     34  info("Test that you can not preview in another original file");
     35  await selectSource(dbg, "output.js");
     36  await hoverAtPos(dbg, { line: 2, column: 17 });
     37  await assertNoTooltip(dbg);
     38 });