mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-08 16:58:38 +09:00
import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo
This commit is contained in:
commit
dcd9973243
150858 changed files with 23884658 additions and 0 deletions
41
devtools/client/storage/test/browser_storage_overflow.js
Normal file
41
devtools/client/storage/test/browser_storage_overflow.js
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
// Test endless scrolling when a lot of items are present in the storage
|
||||
// inspector table.
|
||||
"use strict";
|
||||
|
||||
add_task(function* () {
|
||||
yield openTabAndSetupStorage(MAIN_DOMAIN + "storage-overflow.html");
|
||||
|
||||
let $ = id => gPanelWindow.document.querySelector(id);
|
||||
let $$ = sel => gPanelWindow.document.querySelectorAll(sel);
|
||||
|
||||
gUI.tree.expandAll();
|
||||
yield selectTreeItem(["localStorage", "http://test1.example.org"]);
|
||||
|
||||
let table = $("#storage-table .table-widget-body");
|
||||
let cellHeight = $(".table-widget-cell").getBoundingClientRect().height;
|
||||
|
||||
is($$("#value .table-widget-cell").length, 50,
|
||||
"Table should initially display 50 items");
|
||||
|
||||
let onStoresUpdate = gUI.once("store-objects-updated");
|
||||
table.scrollTop += cellHeight * 50;
|
||||
yield onStoresUpdate;
|
||||
|
||||
is($$("#value .table-widget-cell").length, 100,
|
||||
"Table should display 100 items after scrolling");
|
||||
|
||||
onStoresUpdate = gUI.once("store-objects-updated");
|
||||
table.scrollTop += cellHeight * 50;
|
||||
yield onStoresUpdate;
|
||||
|
||||
is($$("#value .table-widget-cell").length, 150,
|
||||
"Table should display 150 items after scrolling");
|
||||
|
||||
onStoresUpdate = gUI.once("store-objects-updated");
|
||||
table.scrollTop += cellHeight * 50;
|
||||
yield onStoresUpdate;
|
||||
|
||||
is($$("#value .table-widget-cell").length, 160,
|
||||
"Table should display all 160 items after scrolling");
|
||||
yield finishTests();
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue