OLD | NEW |
1 Verify that queuing up several commands works (and they all fire). | 1 Verify that queuing up several commands works (and they all fire). |
2 | 2 |
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". | 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". |
4 | 4 |
5 | 5 |
6 indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.
msIndexedDB || self.OIndexedDB; | |
7 | |
8 dbname = "queued-commands.html" | 6 dbname = "queued-commands.html" |
9 indexedDB.deleteDatabase(dbname) | 7 indexedDB.deleteDatabase(dbname) |
10 indexedDB.open(dbname) | 8 indexedDB.open(dbname) |
11 db.createObjectStore('storeName') | 9 db.createObjectStore('storeName') |
12 store.createIndex('indexName', 'x') | 10 store.createIndex('indexName', 'x') |
13 store.add({x: 'value', y: 'zzz'}, 'key') | 11 store.add({x: 'value', y: 'zzz'}, 'key') |
14 store.add({x: 'value2', y: 'zzz2'}, 'key2') | 12 store.add({x: 'value2', y: 'zzz2'}, 'key2') |
15 store.put({x: 'valu2', y: 'zz2'}, 'ky2') | 13 store.put({x: 'valu2', y: 'zz2'}, 'ky2') |
16 PASS 0 is 0 | 14 PASS 0 is 0 |
17 PASS 1 is 1 | 15 PASS 1 is 1 |
18 PASS 2 is 2 | 16 PASS 2 is 2 |
19 PASS successfullyParsed is true | 17 PASS successfullyParsed is true |
20 | 18 |
21 TEST COMPLETE | 19 TEST COMPLETE |
22 | 20 |
OLD | NEW |