tor-browser

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

browser_dbg-tabs-keyboard.js (833B)


      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 removing tabs with keyboard shortcuts
      6 
      7 "use strict";
      8 
      9 add_task(async function () {
     10  const dbg = await initDebugger(
     11    "doc-scripts.html",
     12    "simple1.js",
     13    "simple2.js"
     14  );
     15 
     16  await selectSource(dbg, "simple1.js");
     17  await selectSource(dbg, "simple2.js");
     18  is(countTabs(dbg), 2, "Two tabs are open");
     19 
     20  pressKey(dbg, "close");
     21  waitForDispatch(dbg.store, "CLOSE_TABS_FOR_SOURCES");
     22  is(countTabs(dbg), 1, "One tab is open");
     23 
     24  await waitForSelectedSource(dbg, "simple1.js");
     25 
     26  pressKey(dbg, "close");
     27  waitForDispatch(dbg.store, "CLOSE_TABS_FOR_SOURCES");
     28  is(countTabs(dbg), 0, "No tabs open");
     29 });