Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(492)

Unified Diff: third_party/WebKit/LayoutTests/http/tests/inspector/indexeddb/database-refresh-view.html

Issue 2914293002: [IndexedDB] [DevTools] Right-click 'Refresh' on database now updates object store view, also fixed … (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/inspector/indexeddb/database-refresh-view-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/http/tests/inspector/indexeddb/database-refresh-view.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector/indexeddb/database-refresh-view.html b/third_party/WebKit/LayoutTests/http/tests/inspector/indexeddb/database-refresh-view.html
index d9c3bb0df10d3ba4772291f7e19008ec823914bb..2c70dd563f31d45f00f3947422a07903a69cc6c6 100644
--- a/third_party/WebKit/LayoutTests/http/tests/inspector/indexeddb/database-refresh-view.html
+++ b/third_party/WebKit/LayoutTests/http/tests/inspector/indexeddb/database-refresh-view.html
@@ -87,6 +87,11 @@ async function test()
view._refreshDatabaseButtonClicked();
}
+ function waitRefreshDatabaseRightClick(callback) {
+ InspectorTest.addSniffer(Resources.IDBDataView.prototype, "_updatedDataForTests", callback, false);
+ idbDatabaseTreeElement._refreshIndexedDB();
+ }
+
function waitUpdateDataView(callback) {
InspectorTest.addSniffer(Resources.IDBDataView.prototype, "_updatedDataForTests", callback, false);
}
@@ -174,7 +179,25 @@ async function test()
}
}
await new Promise(waitUpdateDataView); // Wait for objectstore data to load on page.
- InspectorTest.addResult("Refreshed database.");
+ InspectorTest.addResult("Refreshed database view.");
+ dumpObjectStores();
+
+ // Add entries
+ await InspectorTest.evaluateInPageAsync("addIDBValue('" + databaseName + "', '" + objectStoreName2 + "', 'testKey2', 'testValue2')");
dmurph 2017/06/01 22:50:31 Can you use this: https://cs.chromium.org/chromium
kristipark 2017/06/02 00:16:56 Since those function uses callbacks, I made the ab
+ InspectorTest.addResult("Added " + objectStoreName2 + " entry.");
+ dumpObjectStores();
+
+ // Right-click refresh database view
+ await new Promise(waitRefreshDatabaseRightClick);
+ for (var i = 0; i < idbDatabaseTreeElement.childCount(); ++i) {
+ var objectStoreTreeElement = idbDatabaseTreeElement.childAt(i);
+ if (objectStoreTreeElement._objectStore.name === objectStoreName2) {
+ objectStoreTreeElement.onselect(false);
dmurph 2017/06/01 22:50:31 Can you comment what this does? This selects the t
kristipark 2017/06/02 00:16:56 Ah, you're right, it doesn't do anything. Removed!
+ break;
+ }
+ }
+ await new Promise(waitUpdateDataView); // Wait for objectstore data to load on page.
+ InspectorTest.addResult("Right-click refreshed database.");
dumpObjectStores();
InspectorTest.completeTest();
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/inspector/indexeddb/database-refresh-view-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698