| 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 indexObject2.unique is false | 17 PASS indexObject2.unique is false |
| 18 PASS indexObject3.unique is true | 18 PASS indexObject3.unique is true |
| 19 Expecting TypeError exception from store.createIndex('failureIndex', 'zzz', true
) | 19 Expecting TypeError exception from store.createIndex('failureIndex', 'zzz', true
) |
| 20 PASS Exception was thrown. | 20 PASS Exception was thrown. |
| 21 PASS store.createIndex('failureIndex', 'zzz', true) threw TypeError: Failed to e
xecute 'createIndex' on 'IDBObjectStore': parameter 3 ('options') is not an obje
ct. | 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 Expecting TypeError exception from store.createIndex('failureIndex', 'zzz', 'str
ing') | 22 Expecting TypeError exception from store.createIndex('failureIndex', 'zzz', 'str
ing') |
| 23 PASS Exception was thrown. | 23 PASS Exception was thrown. |
| 24 PASS store.createIndex('failureIndex', 'zzz', 'string') threw TypeError: Failed
to execute 'createIndex' on 'IDBObjectStore': parameter 3 ('options') is not an
object. | 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 'name' in indexObject is true | 25 PASS 'name' in indexObject is true |
| 26 PASS indexObject.name is "indexName" | 26 PASS indexObject.name is "indexName" |
| 27 PASS 'objectStore' in indexObject is true | 27 PASS 'objectStore' in indexObject is true |
| 28 PASS indexObject.objectStore.name is "storeName" | 28 PASS indexObject.objectStore.name is "storeName" |
| 29 PASS 'keyPath' in indexObject is true | 29 PASS 'keyPath' in indexObject is true |
| 30 PASS indexObject.keyPath is "x" | 30 PASS indexObject.keyPath is "x" |
| 31 PASS 'unique' in indexObject is true | 31 PASS 'unique' in indexObject is true |
| 32 PASS 'multiEntry' in indexObject is true | 32 PASS 'multiEntry' in indexObject is true |
| 33 PASS indexObject.unique is false | 33 PASS indexObject.unique is false |
| 34 PASS indexObject.multiEntry is false | 34 PASS indexObject.multiEntry is false |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 Passing an invalid key into indexObject.getKey({}). | 134 Passing an invalid key into indexObject.getKey({}). |
| 135 Expecting exception from indexObject.getKey({}) | 135 Expecting exception from indexObject.getKey({}) |
| 136 PASS Exception was thrown. | 136 PASS Exception was thrown. |
| 137 PASS code is 0 | 137 PASS code is 0 |
| 138 PASS ename is 'DataError' | 138 PASS ename is 'DataError' |
| 139 Exception message: Failed to execute 'getKey' on 'IDBIndex': The parameter is no
t a valid key. | 139 Exception message: Failed to execute 'getKey' on 'IDBIndex': The parameter is no
t a valid key. |
| 140 PASS successfullyParsed is true | 140 PASS successfullyParsed is true |
| 141 | 141 |
| 142 TEST COMPLETE | 142 TEST COMPLETE |
| 143 | 143 |
| OLD | NEW |