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

Unified Diff: LayoutTests/storage/indexeddb/cursor-request-cycle-expected.txt

Issue 23653024: IndexedDB: Have IDBCursor and IDBRequest explicitly break ref cycles (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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: LayoutTests/storage/indexeddb/cursor-request-cycle-expected.txt
diff --git a/LayoutTests/storage/indexeddb/closed-cursor-expected.txt b/LayoutTests/storage/indexeddb/cursor-request-cycle-expected.txt
similarity index 56%
copy from LayoutTests/storage/indexeddb/closed-cursor-expected.txt
copy to LayoutTests/storage/indexeddb/cursor-request-cycle-expected.txt
index 6476cf3bec342e311b73fcdc4563229fbef9a660..5acf11a27723ef2e6da5554cc082ea52235eb5e1 100644
--- a/LayoutTests/storage/indexeddb/closed-cursor-expected.txt
+++ b/LayoutTests/storage/indexeddb/cursor-request-cycle-expected.txt
@@ -1,33 +1,39 @@
-Verify that that cursors accessed after being closed are well behaved
+Verify that that cursors weakly hold request, and work if request is GC'd
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;
alecflett 2013/09/06 17:56:35 Not right now, but we really ought to scrub these
jsbell 2013/09/06 18:07:43 ISTR that we were waiting until the *reference* bo
-dbname = "closed-cursor.html"
+dbname = "cursor-request-cycle.html"
indexedDB.deleteDatabase(dbname)
indexedDB.open(dbname)
prepareDatabase():
db = event.target.result
store = db.createObjectStore('store')
-store.put({value: 'value'}, ['key'])
onOpen():
db = event.target.result
tx = db.transaction('store')
store = tx.objectStore('store')
cursorRequest = store.openCursor()
+otherRequest = store.get(0)
-openCursorSuccess():
+openCursorRequest():
cursor = cursorRequest.result
-Don't continue the cursor, so it retains its key/primaryKey/value
-
-transactionComplete():
-PASS JSON.stringify(cursor.key) is "[\"key\"]"
-PASS JSON.stringify(cursor.primaryKey) is "[\"key\"]"
-PASS JSON.stringify(cursor.value) is "{\"value\":\"value\"}"
+PASS cursor is non-null.
+PASS cursor.key is "key1"
+PASS cursor.value is "value1"
+
+otherRequestSuccess():
+PASS afterCount is beforeCount
+cursor.continue()
+finalRequest = store.get(0)
+
+finalRequestSuccess():
+PASS cursor.key is "key2"
+PASS cursor.value is "value2"
PASS successfullyParsed is true
TEST COMPLETE

Powered by Google App Engine
This is Rietveld 408576698