tor-browser

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

browser_storage_cache_overflow.js (926B)


      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 // Test endless scrolling when a lot of items are present in the storage
      6 // inspector table for Cache storage.
      7 "use strict";
      8 
      9 const ITEMS_PER_PAGE = 50;
     10 
     11 add_task(async function () {
     12  await openTabAndSetupStorage(
     13    URL_ROOT_COM_SSL + "storage-cache-overflow.html"
     14  );
     15 
     16  gUI.tree.expandAll();
     17 
     18  await selectTreeItem(["Cache", "https://example.com", "lorem"]);
     19  await waitFor(
     20    () => getCellLength() == ITEMS_PER_PAGE,
     21    "Wait until the first 50 messages have been rendered"
     22  );
     23 
     24  await scroll();
     25  await waitFor(
     26    () => getCellLength() == ITEMS_PER_PAGE * 2,
     27    "Wait until 100 messages have been rendered"
     28  );
     29 
     30  info("Close Toolbox");
     31  await gDevTools.closeToolboxForTab(gBrowser.selectedTab);
     32 });