blob: c58b6b9b5f824e5f27871cf63ea004b2b6f93efb [file] [log] [blame]
beidson@apple.com8ddd10a2015-11-20 18:55:42 +00001This tests that if deleteDatabase is called while there is already an open connection to the database that the open connection gets the appropriate versionChange event.
beidson@apple.combb616842016-01-19 23:41:11 +00002
3On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
4
5
beidson@apple.comdea703e2016-01-20 22:27:08 +00006indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
7
8indexedDB.deleteDatabase(dbname)
9indexedDB.open(dbname)
beidson@apple.com8ddd10a2015-11-20 18:55:42 +000010Initial upgrade old version - 0 new version - 1
11Version change complete
12Requesting deleteDatabase
beidson@apple.com9476af12015-11-21 03:57:19 +000013open db success
beidson@apple.com3f13f772015-11-20 22:14:56 +000014First connection received versionchange event: oldVersion 1, newVersion null
15Delete database success: oldVersion 1, newVersion null
beidson@apple.com8ddd10a2015-11-20 18:55:42 +000016Recreating database to make sure it's new and empty
17Second upgrade old version - 0 new version - 1
18Unable to get object store in second upgrade transaction (which is correct because it should not be there)
19Second database upgrade success
beidson@apple.combb616842016-01-19 23:41:11 +000020PASS successfullyParsed is true
21
22TEST COMPLETE
beidson@apple.com8ddd10a2015-11-20 18:55:42 +000023