beidson@apple.com | 8ddd10a | 2015-11-20 18:55:42 +0000 | [diff] [blame] | 1 | This 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.com | bb61684 | 2016-01-19 23:41:11 +0000 | [diff] [blame] | 2 | |
| 3 | On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". |
| 4 | |
| 5 | |
beidson@apple.com | dea703e | 2016-01-20 22:27:08 +0000 | [diff] [blame] | 6 | indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB; |
| 7 | |
| 8 | indexedDB.deleteDatabase(dbname) |
| 9 | indexedDB.open(dbname) |
beidson@apple.com | 8ddd10a | 2015-11-20 18:55:42 +0000 | [diff] [blame] | 10 | Initial upgrade old version - 0 new version - 1 |
| 11 | Version change complete |
| 12 | Requesting deleteDatabase |
beidson@apple.com | 9476af1 | 2015-11-21 03:57:19 +0000 | [diff] [blame] | 13 | open db success |
beidson@apple.com | 3f13f77 | 2015-11-20 22:14:56 +0000 | [diff] [blame] | 14 | First connection received versionchange event: oldVersion 1, newVersion null |
| 15 | Delete database success: oldVersion 1, newVersion null |
beidson@apple.com | 8ddd10a | 2015-11-20 18:55:42 +0000 | [diff] [blame] | 16 | Recreating database to make sure it's new and empty |
| 17 | Second upgrade old version - 0 new version - 1 |
| 18 | Unable to get object store in second upgrade transaction (which is correct because it should not be there) |
| 19 | Second database upgrade success |
beidson@apple.com | bb61684 | 2016-01-19 23:41:11 +0000 | [diff] [blame] | 20 | PASS successfullyParsed is true |
| 21 | |
| 22 | TEST COMPLETE |
beidson@apple.com | 8ddd10a | 2015-11-20 18:55:42 +0000 | [diff] [blame] | 23 | |