| OLD | NEW |
| 1 Test IndexedDB Array-type keyPaths | 1 Test IndexedDB Array-type keyPaths |
| 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; | |
| 7 | |
| 8 dbname = "keypath-arrays.html" | 6 dbname = "keypath-arrays.html" |
| 9 indexedDB.deleteDatabase(dbname) | 7 indexedDB.deleteDatabase(dbname) |
| 10 indexedDB.open(dbname) | 8 indexedDB.open(dbname) |
| 11 store = db.createObjectStore('store', {keyPath: ['a', 'b']}) | 9 store = db.createObjectStore('store', {keyPath: ['a', 'b']}) |
| 12 index = store.createIndex('index', ['c', 'd']) | 10 index = store.createIndex('index', ['c', 'd']) |
| 13 PASS areArraysEqual(index.keyPath, ['c', 'd']) is true | 11 PASS areArraysEqual(index.keyPath, ['c', 'd']) is true |
| 14 PASS index.keyPath instanceof DOMStringList is false | 12 PASS index.keyPath instanceof DOMStringList is false |
| 15 Expecting exception from db.createObjectStore('store-with-generator', {keyPath:
['a', 'b'], autoIncrement: true}) | 13 Expecting exception from db.createObjectStore('store-with-generator', {keyPath:
['a', 'b'], autoIncrement: true}) |
| 16 PASS Exception was thrown. | 14 PASS Exception was thrown. |
| 17 PASS code is DOMException.INVALID_ACCESS_ERR | 15 PASS code is DOMException.INVALID_ACCESS_ERR |
| (...skipping 25 matching lines...) Expand all Loading... |
| 43 PASS JSON.stringify(cursor.key) is "[1,2]" | 41 PASS JSON.stringify(cursor.key) is "[1,2]" |
| 44 request = index.openCursor() | 42 request = index.openCursor() |
| 45 cursor = request.result | 43 cursor = request.result |
| 46 PASS cursor is non-null. | 44 PASS cursor is non-null. |
| 47 PASS JSON.stringify(cursor.primaryKey) is "[1,2]" | 45 PASS JSON.stringify(cursor.primaryKey) is "[1,2]" |
| 48 PASS JSON.stringify(cursor.key) is "[3,4]" | 46 PASS JSON.stringify(cursor.key) is "[3,4]" |
| 49 PASS successfullyParsed is true | 47 PASS successfullyParsed is true |
| 50 | 48 |
| 51 TEST COMPLETE | 49 TEST COMPLETE |
| 52 | 50 |
| OLD | NEW |