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

Unified Diff: third_party/WebKit/Source/devtools/front_end/resources/IndexedDBViews.js

Issue 2902673003: Added a refresh database button on the IndexedDB view. (Closed)
Patch Set: Fixing trybot failures, wrong security origin in test expected file. 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 | « third_party/WebKit/LayoutTests/http/tests/inspector/indexeddb/indexeddb-test.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/resources/IndexedDBViews.js
diff --git a/third_party/WebKit/Source/devtools/front_end/resources/IndexedDBViews.js b/third_party/WebKit/Source/devtools/front_end/resources/IndexedDBViews.js
index eb45a9498ee74c960806e670e1cb677b99528fbe..c6c3217be46e1d6d1375809fccacfe6c36c84e07 100644
--- a/third_party/WebKit/Source/devtools/front_end/resources/IndexedDBViews.js
+++ b/third_party/WebKit/Source/devtools/front_end/resources/IndexedDBViews.js
@@ -53,6 +53,11 @@ Resources.IDBDatabaseView = class extends UI.VBox {
Common.UIString('Delete database'), () => this._deleteDatabase(), Common.UIString('Delete database'));
footer.appendChild(this._clearButton);
+ this._refreshButton = UI.createTextButton(
+ Common.UIString('Refresh database'), () => this._refreshDatabaseButtonClicked(),
+ Common.UIString('Refresh database'));
+ footer.appendChild(this._refreshButton);
+
this.update(database);
}
@@ -61,12 +66,21 @@ Resources.IDBDatabaseView = class extends UI.VBox {
this._versionElement.textContent = this._database.version;
}
+ _refreshDatabaseButtonClicked() {
+ this._model.refreshDatabase(this._database.databaseId);
+ }
+
/**
* @param {!Resources.IndexedDBModel.Database} database
*/
update(database) {
this._database = database;
this._refreshDatabase();
+ this._updatedForTests();
+ }
+
+ _updatedForTests() {
+ // Sniffed in tests.
}
_deleteDatabase() {
@@ -288,6 +302,7 @@ Resources.IDBDataView = class extends UI.SimpleView {
this._pageBackButton.setEnabled(!!skipCount);
this._pageForwardButton.setEnabled(hasMore);
+ this._updatedDataForTests();
}
var idbKeyRange = key ? window.IDBKeyRange.lowerBound(key) : null;
@@ -301,6 +316,10 @@ Resources.IDBDataView = class extends UI.SimpleView {
}
}
+ _updatedDataForTests() {
+ // Sniffed in tests.
+ }
+
/**
* @param {!Common.Event} event
*/
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/inspector/indexeddb/indexeddb-test.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698