tor-browser

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

browser_dbg-overrides-original.js (1277B)


      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  await pushPref("devtools.debugger.map-scopes-enabled", true);
      9  const dbg = await initDebugger(
     10    "doc-sourcemaps3.html",
     11    "bundle.js",
     12    "sorted.js",
     13    "test.js"
     14  );
     15 
     16  const sortedSrc = findSource(dbg, "sorted.js");
     17  const bundleSrc = findSource(dbg, "bundle.js");
     18 
     19  info("Check that override context menu item is disabled for original files");
     20  await selectSource(dbg, sortedSrc);
     21  let waitForPopup = waitForContextMenu(dbg);
     22  rightClickEl(dbg, findSourceNodeWithText(dbg, "sorted.js"));
     23  let popup = await waitForPopup;
     24  await assertContextMenuItemDisabled(dbg, "#node-menu-overrides", true);
     25  await closeContextMenu(dbg, popup);
     26 
     27  info("Check that override context menu item is enabled for generated files");
     28  await selectSource(dbg, bundleSrc);
     29  waitForPopup = waitForContextMenu(dbg);
     30  rightClickEl(dbg, findSourceNodeWithText(dbg, "bundle.js"));
     31  popup = await waitForPopup;
     32  await assertContextMenuItemDisabled(dbg, "#node-menu-overrides", false);
     33  await closeContextMenu(dbg, popup);
     34 });