OLD | NEW |
| 1 CONSOLE WARNING: 'DOMStringList.contains()' is deprecated, and will be removed. |
1 Test the basics of IndexedDB's IDBObjectStore. | 2 Test the basics of IndexedDB's IDBObjectStore. |
2 | 3 |
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". | 4 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". |
4 | 5 |
5 | 6 |
6 indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.
msIndexedDB || self.OIndexedDB; | 7 indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.
msIndexedDB || self.OIndexedDB; |
7 | 8 |
8 dbname = "objectstore-basics.html" | 9 dbname = "objectstore-basics.html" |
9 indexedDB.deleteDatabase(dbname) | 10 indexedDB.deleteDatabase(dbname) |
10 indexedDB.open(dbname) | 11 indexedDB.open(dbname) |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 PASS db.version is 1 | 75 PASS db.version is 1 |
75 PASS store.transaction is setVersionTrans | 76 PASS store.transaction is setVersionTrans |
76 PASS store.indexNames is ['indexName'] | 77 PASS store.indexNames is ['indexName'] |
77 PASS store.indexNames.length is 1 | 78 PASS store.indexNames.length is 1 |
78 PASS store.indexNames.contains('') is false | 79 PASS store.indexNames.contains('') is false |
79 PASS store.indexNames.contains('indexFail') is false | 80 PASS store.indexNames.contains('indexFail') is false |
80 PASS store.indexNames.contains('indexName') is true | 81 PASS store.indexNames.contains('indexName') is true |
81 PASS store.indexNames[0] is "indexName" | 82 PASS store.indexNames[0] is "indexName" |
82 PASS store.indexNames[1] is undefined. | 83 PASS store.indexNames[1] is undefined. |
83 PASS store.indexNames[100] is undefined. | 84 PASS store.indexNames[100] is undefined. |
84 PASS store.indexNames.item(1) is null | |
85 PASS store.indexNames.item(100) is null | |
86 | 85 |
87 openAgain(): | 86 openAgain(): |
88 indexedDB.open(dbname) | 87 indexedDB.open(dbname) |
89 | 88 |
90 addData(): | 89 addData(): |
91 db = event.target.result | 90 db = event.target.result |
92 transaction = db.transaction(['storeName'], 'readwrite') | 91 transaction = db.transaction(['storeName'], 'readwrite') |
93 store = transaction.objectStore('storeName') | 92 store = transaction.objectStore('storeName') |
94 Try to insert data with a Date key: | 93 Try to insert data with a Date key: |
95 store.add({x: 'foo'}, testDate) | 94 store.add({x: 'foo'}, testDate) |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 The key parameter was provided but does not contain a valid key. | 227 The key parameter was provided but does not contain a valid key. |
229 Expecting exception from storeWithOutOfLineKeys.add({}, null) | 228 Expecting exception from storeWithOutOfLineKeys.add({}, null) |
230 PASS Exception was thrown. | 229 PASS Exception was thrown. |
231 PASS code is 0 | 230 PASS code is 0 |
232 PASS ename is 'DataError' | 231 PASS ename is 'DataError' |
233 Exception message: Failed to execute 'add' on 'IDBObjectStore': The parameter is
not a valid key. | 232 Exception message: Failed to execute 'add' on 'IDBObjectStore': The parameter is
not a valid key. |
234 PASS successfullyParsed is true | 233 PASS successfullyParsed is true |
235 | 234 |
236 TEST COMPLETE | 235 TEST COMPLETE |
237 | 236 |
OLD | NEW |