tor-browser

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

browser_storage_fission_hide_aboutblank.js (847B)


      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 "use strict";
      6 
      7 add_task(async function () {
      8  const html = `<h1>about:blank iframe</h1><iframe src="about:blank"></iframe>`;
      9  const url = `https://example.com/document-builder.sjs?html=${encodeURI(
     10    html
     11  )}`;
     12  // open tab
     13  await openTabAndSetupStorage(url);
     14  const doc = gPanelWindow.document;
     15 
     16  checkTree(doc, ["localStorage", "https://example.com"], true);
     17  checkTree(doc, ["localStorage", "about:blank"], false);
     18 });
     19 
     20 add_task(async function () {
     21  // open tab with about:blank as top-level page
     22  await openTabAndSetupStorage("about:blank");
     23  const doc = gPanelWindow.document;
     24 
     25  checkTree(doc, ["localStorage"], true);
     26 });