tor-browser

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

browser_bug455852.js (767B)


      1 add_task(async function () {
      2  is(gBrowser.tabs.length, 1, "one tab is open");
      3 
      4  gBrowser.selectedBrowser.focus();
      5  isnot(
      6    document.activeElement,
      7    gURLBar.inputField,
      8    "location bar is not focused"
      9  );
     10 
     11  var tab = gBrowser.selectedTab;
     12  Services.prefs.setBoolPref("browser.tabs.closeWindowWithLastTab", false);
     13 
     14  EventUtils.synthesizeKey("w", { accelKey: true });
     15 
     16  is(tab.parentNode, null, "ctrl+w removes the tab");
     17  is(gBrowser.tabs.length, 1, "a new tab has been opened");
     18  is(
     19    document.activeElement,
     20    gURLBar.inputField,
     21    "location bar is focused for the new tab"
     22  );
     23 
     24  if (Services.prefs.prefHasUserValue("browser.tabs.closeWindowWithLastTab")) {
     25    Services.prefs.clearUserPref("browser.tabs.closeWindowWithLastTab");
     26  }
     27 });