diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /devtools/client/storage/test/browser_storage_overflow.js | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'devtools/client/storage/test/browser_storage_overflow.js')
-rw-r--r-- | devtools/client/storage/test/browser_storage_overflow.js | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/devtools/client/storage/test/browser_storage_overflow.js b/devtools/client/storage/test/browser_storage_overflow.js new file mode 100644 index 000000000..88181ca05 --- /dev/null +++ b/devtools/client/storage/test/browser_storage_overflow.js @@ -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(); +}); |