OLD | NEW |
1 Test the basics of IndexedDB's webkitIDBIndex. | 1 Test the basics of IndexedDB's webkitIDBIndex. |
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 = "index-basics.html" | 8 dbname = "index-basics.html" |
9 indexedDB.deleteDatabase(dbname) | 9 indexedDB.deleteDatabase(dbname) |
10 indexedDB.open(dbname) | 10 indexedDB.open(dbname) |
11 | 11 |
12 prepareDatabase(): | 12 prepareDatabase(): |
13 db.createObjectStore('storeName', null) | 13 db.createObjectStore('storeName', null) |
14 store.createIndex('indexName', 'x') | 14 store.createIndex('indexName', 'x') |
15 store.createIndex('indexName2', 'y', {unique: false}) | 15 store.createIndex('indexName2', 'y', {unique: false}) |
16 store.createIndex('zIndex', 'z', {unique: true}) | 16 store.createIndex('zIndex', 'z', {unique: true}) |
| 17 PASS store.createIndex('index4', 'path', undefined) did not throw exception. |
17 PASS indexObject2.unique is false | 18 PASS indexObject2.unique is false |
18 PASS indexObject3.unique is true | 19 PASS indexObject3.unique is true |
19 Expecting TypeError exception from store.createIndex('failureIndex', 'zzz', true
) | 20 Expecting TypeError exception from store.createIndex('failureIndex', 'zzz', true
) |
20 PASS Exception was thrown. | 21 PASS Exception was thrown. |
21 PASS store.createIndex('failureIndex', 'zzz', true) threw TypeError: Failed to e
xecute 'createIndex' on 'IDBObjectStore': No function was found that matched the
signature provided. | 22 PASS store.createIndex('failureIndex', 'zzz', true) threw TypeError: Failed to e
xecute 'createIndex' on 'IDBObjectStore': No function was found that matched the
signature provided. |
22 Expecting TypeError exception from store.createIndex('failureIndex', 'zzz', 'str
ing') | 23 Expecting TypeError exception from store.createIndex('failureIndex', 'zzz', 'str
ing') |
23 PASS Exception was thrown. | 24 PASS Exception was thrown. |
24 PASS store.createIndex('failureIndex', 'zzz', 'string') threw TypeError: Failed
to execute 'createIndex' on 'IDBObjectStore': No function was found that matched
the signature provided. | 25 PASS store.createIndex('failureIndex', 'zzz', 'string') threw TypeError: Failed
to execute 'createIndex' on 'IDBObjectStore': No function was found that matched
the signature provided. |
25 PASS 'name' in indexObject is true | 26 PASS 'name' in indexObject is true |
26 PASS indexObject.name is "indexName" | 27 PASS indexObject.name is "indexName" |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 Passing an invalid key into indexObject.getKey({}). | 135 Passing an invalid key into indexObject.getKey({}). |
135 Expecting exception from indexObject.getKey({}) | 136 Expecting exception from indexObject.getKey({}) |
136 PASS Exception was thrown. | 137 PASS Exception was thrown. |
137 PASS code is 0 | 138 PASS code is 0 |
138 PASS ename is 'DataError' | 139 PASS ename is 'DataError' |
139 Exception message: Failed to execute 'getKey' on 'IDBIndex': The parameter is no
t a valid key. | 140 Exception message: Failed to execute 'getKey' on 'IDBIndex': The parameter is no
t a valid key. |
140 PASS successfullyParsed is true | 141 PASS successfullyParsed is true |
141 | 142 |
142 TEST COMPLETE | 143 TEST COMPLETE |
143 | 144 |
OLD | NEW |