blob: f22e47fce5df8c1c7e83782065db466248a3f342 [file] [log] [blame]
Checks that garbage collection doesn't reclaim objects with pending activity
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;
indexedDB.deleteDatabase(dbname)
indexedDB.open(dbname)
prepareDatabase():
store = db.createObjectStore('store')
store.put(0, 0)
testTransaction():
transaction = db.transaction('store')
transaction.oncomplete = transactionOnComplete
transaction = null
self.gc()
PASS Transaction 'complete' event fired.
testRequest():
transaction = db.transaction('store')
store = transaction.objectStore('store')
request = store.get(0)
request.onsuccess = requestOnSuccess
request = null
self.gc()
PASS Request 'success' event fired.
testCursorRequest():
transaction = db.transaction('store')
store = transaction.objectStore('store')
request = store.openCursor()
request.onsuccess = cursorRequestOnFirstSuccess
PASS Request 'success' event fired.
cursor = request.result
cursor.continue()
request.onsuccess = cursorRequestOnSecondSuccess
request = null
self.gc()
PASS Request 'success' event fired.
PASS successfullyParsed is true
TEST COMPLETE