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

Unified Diff: LayoutTests/storage/indexeddb/prefetch-invalidation-expected.txt

Issue 101503003: Test for prefetch cache resetting on IDBObjectStore.clear() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years 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: LayoutTests/storage/indexeddb/prefetch-invalidation-expected.txt
diff --git a/LayoutTests/storage/indexeddb/prefetch-invalidation-expected.txt b/LayoutTests/storage/indexeddb/prefetch-invalidation-expected.txt
new file mode 100644
index 0000000000000000000000000000000000000000..047882ef133235223fb78c59b45dd4a7d6522d14
--- /dev/null
+++ b/LayoutTests/storage/indexeddb/prefetch-invalidation-expected.txt
@@ -0,0 +1,57 @@
+Ensure IndexedDB's write operations invalidate cursor prefetch caches
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+dbname = "prefetch-invalidation.html"
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+
+prepareDatabase():
+db = event.target.result
+store = db.createObjectStore('store')
+
+onOpenSuccess():
+db = event.target.result
+
+-------------------------------------------
+
+doPrefetchInvalidationTest():
+store = db.transaction('store', 'readwrite').objectStore('store')
+Populate the store with 200 records.
+cursorRequest = store.openCursor()
+
+continue100Times():
+PASS cursorRequest.result is non-null.
+
+doOperationAndContinue():
+store.delete(IDBKeyRange.bound(-Infinity, +Infinity))
+cursor = cursorRequest.result
+cursor.continue()
+
+onContinueSuccess():
+PASS cursorRequest.result is null
+
+-------------------------------------------
+
+doPrefetchInvalidationTest():
+store = db.transaction('store', 'readwrite').objectStore('store')
+Populate the store with 200 records.
+cursorRequest = store.openCursor()
+
+continue100Times():
+PASS cursorRequest.result is non-null.
+
+doOperationAndContinue():
+store.clear()
+cursor = cursorRequest.result
+cursor.continue()
+
+onContinueSuccess():
+PASS cursorRequest.result is null
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Powered by Google App Engine
This is Rietveld 408576698