OLD | NEW |
1 Test IndexedDB's opening DB more than once | 1 Test IndexedDB's opening DB more than once |
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 dbname = "global-data.html" | 6 dbname = "global-data.html" |
7 indexedDB.deleteDatabase(dbname) | 7 indexedDB.deleteDatabase(dbname) |
8 indexedDB.open(dbname) | 8 indexedDB.open(dbname) |
9 db1.createObjectStore(objectStoreName, objectStoreOptions); | 9 db1.createObjectStore(objectStoreName, objectStoreOptions); |
10 indexedDB.open(dbname); | 10 indexedDB.open(dbname); |
11 db2 = event.target.result | 11 db2 = event.target.result |
12 PASS db1 !== db2 is true | 12 PASS db1 !== db2 is true |
13 PASS db1.objectStoreNames.length is 1 | 13 PASS db1.objectStoreNames.length is 1 |
14 PASS db1.objectStoreNames.item(0) is objectStoreName | 14 PASS db1.objectStoreNames[0] is objectStoreName |
15 PASS db2.objectStoreNames.length is 1 | 15 PASS db2.objectStoreNames.length is 1 |
16 PASS db2.objectStoreNames.item(0) is objectStoreName | 16 PASS db2.objectStoreNames[0] is objectStoreName |
17 objectStore1 = db1.transaction(objectStoreName).objectStore(objectStoreName); | 17 objectStore1 = db1.transaction(objectStoreName).objectStore(objectStoreName); |
18 PASS objectStore1.name is objectStoreName | 18 PASS objectStore1.name is objectStoreName |
19 PASS objectStore1.keyPath is objectStoreOptions.keyPath | 19 PASS objectStore1.keyPath is objectStoreOptions.keyPath |
20 objectStore2 = db2.transaction(objectStoreName).objectStore(objectStoreName); | 20 objectStore2 = db2.transaction(objectStoreName).objectStore(objectStoreName); |
21 PASS objectStore1 !== objectStore2 is true | 21 PASS objectStore1 !== objectStore2 is true |
22 PASS objectStore2.name is objectStoreName | 22 PASS objectStore2.name is objectStoreName |
23 PASS objectStore2.keyPath is objectStoreOptions.keyPath | 23 PASS objectStore2.keyPath is objectStoreOptions.keyPath |
24 PASS successfullyParsed is true | 24 PASS successfullyParsed is true |
25 | 25 |
26 TEST COMPLETE | 26 TEST COMPLETE |
27 | 27 |
OLD | NEW |