tor-browser

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

browser_581937.js (717B)


      1 // Tests that an about:blank tab with no history will not be saved into
      2 // session store and thus, it will not show up in Recently Closed Tabs.
      3 
      4 "use strict";
      5 
      6 add_task(async function () {
      7  let tab = BrowserTestUtils.addTab(gBrowser, "about:blank");
      8  await BrowserTestUtils.browserLoaded(tab.linkedBrowser, {
      9    wantLoad: "about:blank",
     10  });
     11 
     12  is(
     13    tab.linkedBrowser.currentURI.spec,
     14    "about:blank",
     15    "we will be removing an about:blank tab"
     16  );
     17 
     18  let r = `rand-${Math.random()}`;
     19  ss.setCustomTabValue(tab, "foobar", r);
     20 
     21  await promiseRemoveTabAndSessionState(tab);
     22  let closedTabData = ss.getClosedTabDataForWindow(window);
     23  ok(!closedTabData.includes(r), "tab not stored in _closedTabs");
     24 });