tor-browser

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

browser_dbg-preview-multiple-frames.js (948B)


      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 previewing variables with the same name in different frames (Bug 1954182)
      6 
      7 "use strict";
      8 
      9 add_task(async function () {
     10  const dbg = await initDebugger("doc-preview-multiple-frames.html");
     11 
     12  invokeInTab("fn1");
     13  await waitForPaused(dbg);
     14 
     15  info("Preview obj in the top frame");
     16  await assertPreviews(dbg, [
     17    {
     18      line: 6,
     19      column: 9,
     20      header: "Object",
     21      fields: [["prop", "true"]],
     22      expression: "obj",
     23    },
     24  ]);
     25 
     26  info("Preview obj in the second frame");
     27  clickElement(dbg, "frame", 2);
     28  await waitForSelectedLocation(dbg, 3);
     29  await assertPreviews(dbg, [
     30    {
     31      line: 2,
     32      column: 9,
     33      header: "Object",
     34      fields: [["prop", "false"]],
     35      expression: "obj",
     36    },
     37  ]);
     38 });