Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,13 @@ const suites = {
const item = items[i].shadowRoot.querySelector(".remove-todo-button");
item.click();
}
if (j < 9) {
if (j < numberOfIterations - 1) {
// moveToPreviousPage() dispatches previous-page-loaded only
// after the storage read for the previous page completes.
// The read fetches lower item numbers than the page just
// deleted, so it does not race those pending delete writes.
// FinishDeletingItemsFromDB still waits for all deletes
// before the suite advances.
const previousPageButton = document.querySelector("todo-app").shadowRoot.querySelector("todo-bottombar").shadowRoot.querySelector(".previous-page-button");
previousPageButton.click();
await iterationFinishedPromise;
Expand Down
8 changes: 7 additions & 1 deletion experimental/javascript-wc-indexeddb/src/workload-test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,13 @@ const suites = {
const item = items[i].shadowRoot.querySelector(".remove-todo-button");
item.click();
}
if (j < 9) {
if (j < numberOfIterations - 1) {
// moveToPreviousPage() dispatches previous-page-loaded only
// after the storage read for the previous page completes.
// The read fetches lower item numbers than the page just
// deleted, so it does not race those pending delete writes.
// FinishDeletingItemsFromDB still waits for all deletes
// before the suite advances.
const previousPageButton = document.querySelector("todo-app").shadowRoot.querySelector("todo-bottombar").shadowRoot.querySelector(".previous-page-button");
previousPageButton.click();
await iterationFinishedPromise;
Expand Down
Loading