blob: 98ab13a0d64ec837f4ee722f4e1825945b7429f1 [file] [log] [blame]
This test creates a new database with an objectstore that autoincrements. It then puts some things in that object store, checking the keys that were used. But it then aborts that transaction. Then it opens a new one and puts something in it, double checking that the key generator was reverted when the above transaction was aborted.
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)
Initial upgrade needed: Old version - 0 New version - 1
Initial upgrade versionchange transaction complete
Opening readwrite transaction to bump the key generator, but it will be aborted
Key used for put was 1
Key used for put was 2
Key used for put was 3
Key used for put was 4
Key used for put was 5
Key used for put was 6
readwrite transaction abort
Opening readwrite transaction to make sure the key generator had successfully reverted
Key used for put was 1
Key used for put was 2
Key used for put was 3
Key used for put was 4
Key used for put was 5
Key used for put was 6
readwrite transaction complete
Opening readwrite transaction to make sure the key generator picks up where it should've left off
Key used for put was 7
Key used for put was 8
Key used for put was 9
Key used for put was 10
Key used for put was 11
Key used for put was 12
readwrite transaction complete
PASS successfullyParsed is true
TEST COMPLETE