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

Unified Diff: third_party/WebKit/LayoutTests/storage/indexeddb/resources/rename-common.js

Issue 2314933005: Align IndexedDB metadata rollback on transaction abort to spec. (Closed)
Patch Set: Rebased past the big reformat. Created 4 years, 2 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
Index: third_party/WebKit/LayoutTests/storage/indexeddb/resources/rename-common.js
diff --git a/third_party/WebKit/LayoutTests/storage/indexeddb/resources/rename-common.js b/third_party/WebKit/LayoutTests/storage/indexeddb/resources/rename-common.js
index ac3ff5996e7fd997387b0811f51f863d1f8d1515..c24a9fb92bd2c30d08a428086a72a6f3d7549b5b 100644
--- a/third_party/WebKit/LayoutTests/storage/indexeddb/resources/rename-common.js
+++ b/third_party/WebKit/LayoutTests/storage/indexeddb/resources/rename-common.js
@@ -75,6 +75,19 @@ const createDatabase = (testCase, setupCallback) => {
migrateDatabase(testCase, 1, setupCallback));
};
+// Opens an IndexedDB database without performing schema changes.
+//
+// The given version number must match the database's current version.
+//
+// Returns a promise that resolves to an IndexedDB database. The caller must
+// close the database.
+const openDatabase = (testCase, version) => {
+ const request = indexedDB.open(databaseName(testCase), version);
+ const eventWatcher = requestWatcher(testCase, request);
+ return eventWatcher.wait_for('success').then(
+ event => event.target.result);
+}
+
// The data in the 'books' object store records in the first example of the
// IndexedDB specification.
const BOOKS_RECORD_DATA = [

Powered by Google App Engine
This is Rietveld 408576698