tor-browser

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

browser_bug520538.js (677B)


      1 function test() {
      2  var tabCount = gBrowser.tabs.length;
      3  gBrowser.selectedBrowser.focus();
      4  window.browserDOMWindow.openURI(
      5    makeURI("about:blank"),
      6    null,
      7    Ci.nsIBrowserDOMWindow.OPEN_NEWTAB,
      8    Ci.nsIBrowserDOMWindow.OPEN_EXTERNAL,
      9    Services.scriptSecurityManager.getSystemPrincipal()
     10  );
     11  is(
     12    gBrowser.tabs.length,
     13    tabCount + 1,
     14    "'--new-tab about:blank' opens a new tab"
     15  );
     16  is(
     17    gBrowser.selectedTab,
     18    gBrowser.tabs[tabCount],
     19    "'--new-tab about:blank' selects the new tab"
     20  );
     21  is(
     22    document.activeElement,
     23    gURLBar.inputField,
     24    "'--new-tab about:blank' focuses the location bar"
     25  );
     26  gBrowser.removeCurrentTab();
     27 }