OLD | NEW |
1 Test IndexedDB's creating object store and updating properties | 1 Test IndexedDB's creating object store and updating properties |
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; | 6 indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.
msIndexedDB || self.OIndexedDB; |
7 | 7 |
8 dbname = "create-objectstore-basics.html" | 8 dbname = "create-objectstore-basics.html" |
9 indexedDB.deleteDatabase(dbname) | 9 indexedDB.deleteDatabase(dbname) |
10 indexedDB.open(dbname) | 10 indexedDB.open(dbname) |
11 objectStore = db.createObjectStore(info.name, info.options); | 11 objectStore = db.createObjectStore(info.name, info.options); |
12 PASS objectStore.name is info.name | 12 PASS objectStore.name is info.name |
13 PASS objectStore.indexNames.length is 0 | 13 PASS objectStore.indexNames.length is 0 |
14 PASS event.target.transaction.db is db | 14 PASS event.target.transaction.db is db |
15 PASS event.target.transaction.mode is "versionchange" | 15 PASS event.target.transaction.mode is "versionchange" |
16 objectStore = db.createObjectStore(info.name, info.options); | 16 objectStore = db.createObjectStore(info.name, info.options); |
17 PASS objectStore.name is info.name | 17 PASS objectStore.name is info.name |
18 PASS objectStore.indexNames.length is 0 | 18 PASS objectStore.indexNames.length is 0 |
19 PASS event.target.transaction.db is db | 19 PASS event.target.transaction.db is db |
20 PASS event.target.transaction.mode is "versionchange" | 20 PASS event.target.transaction.mode is "versionchange" |
21 objectStore = db.createObjectStore(info.name, info.options); | 21 objectStore = db.createObjectStore(info.name, info.options); |
22 PASS objectStore.name is info.name | 22 PASS objectStore.name is info.name |
23 PASS objectStore.indexNames.length is 0 | 23 PASS objectStore.indexNames.length is 0 |
24 PASS event.target.transaction.db is db | 24 PASS event.target.transaction.db is db |
25 PASS event.target.transaction.mode is "versionchange" | 25 PASS event.target.transaction.mode is "versionchange" |
26 Expecting exception from objectStore = db.createObjectStore(info.name, info.opti
ons) | 26 Expecting exception from objectStore = db.createObjectStore(info.name, info.opti
ons) |
27 PASS Exception was thrown. | 27 PASS Exception was thrown. |
28 PASS code is DOMException.INVALID_ACCESS_ERR | 28 PASS code is DOMException.INVALID_ACCESS_ERR |
29 Exception message: The autoIncrement option was set but the keyPath option was e
mpty or an array. | 29 Exception message: Failed to execute 'createObjectStore' on 'IDBDatabase': The a
utoIncrement option was set but the keyPath option was empty or an array. |
30 objectStore = db.createObjectStore(info.name, info.options); | 30 objectStore = db.createObjectStore(info.name, info.options); |
31 PASS objectStore.name is info.name | 31 PASS objectStore.name is info.name |
32 PASS objectStore.indexNames.length is 0 | 32 PASS objectStore.indexNames.length is 0 |
33 PASS event.target.transaction.db is db | 33 PASS event.target.transaction.db is db |
34 PASS event.target.transaction.mode is "versionchange" | 34 PASS event.target.transaction.mode is "versionchange" |
35 objectStore = db.createObjectStore(info.name, info.options); | 35 objectStore = db.createObjectStore(info.name, info.options); |
36 PASS objectStore.name is info.name | 36 PASS objectStore.name is info.name |
37 PASS objectStore.keyPath is info.options.keyPath | 37 PASS objectStore.keyPath is info.options.keyPath |
38 PASS objectStore.indexNames.length is 0 | 38 PASS objectStore.indexNames.length is 0 |
39 PASS event.target.transaction.db is db | 39 PASS event.target.transaction.db is db |
40 PASS event.target.transaction.mode is "versionchange" | 40 PASS event.target.transaction.mode is "versionchange" |
41 objectStore = db.createObjectStore(info.name, info.options); | 41 objectStore = db.createObjectStore(info.name, info.options); |
42 PASS objectStore.name is info.name | 42 PASS objectStore.name is info.name |
43 PASS objectStore.keyPath is info.options.keyPath | 43 PASS objectStore.keyPath is info.options.keyPath |
44 PASS objectStore.indexNames.length is 0 | 44 PASS objectStore.indexNames.length is 0 |
45 PASS event.target.transaction.db is db | 45 PASS event.target.transaction.db is db |
46 PASS event.target.transaction.mode is "versionchange" | 46 PASS event.target.transaction.mode is "versionchange" |
47 objectStore = db.createObjectStore(info.name, info.options); | 47 objectStore = db.createObjectStore(info.name, info.options); |
48 PASS objectStore.name is info.name | 48 PASS objectStore.name is info.name |
49 PASS objectStore.keyPath is info.options.keyPath | 49 PASS objectStore.keyPath is info.options.keyPath |
50 PASS objectStore.indexNames.length is 0 | 50 PASS objectStore.indexNames.length is 0 |
51 PASS event.target.transaction.db is db | 51 PASS event.target.transaction.db is db |
52 PASS event.target.transaction.mode is "versionchange" | 52 PASS event.target.transaction.mode is "versionchange" |
53 PASS successfullyParsed is true | 53 PASS successfullyParsed is true |
54 | 54 |
55 TEST COMPLETE | 55 TEST COMPLETE |
56 | 56 |
OLD | NEW |