blob: 14820a6dd861eb30bffde5056a44e3a0e5df22f7 [file] [log] [blame]
Test that only the first open call gets an upgradeneeded
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)
request.onsuccess = connection1OpenSuccess
request.onupgradeneeded = connection1UpgradeNeeded
indexedDB.open(dbname)
request.onsuccess = connection2OpenSuccess
request.onupgradeneeded = connection2UpgradeNeeded
connection1UpgradeNeeded():
gotFirstUpgradeNeededEvent = true
PASS event.oldVersion is 0
PASS event.newVersion is 1
connection1OpenSuccess():
db = event.target.result
PASS gotFirstUpgradeNeededEvent is true
PASS db.version is 1
connection2OpenSuccess():
db = event.target.result
PASS gotSecondUpgradeNeededEvent is false
PASS db.version is 1
PASS successfullyParsed is true
TEST COMPLETE