| OLD | NEW |
| 1 Test the use of identical keypaths between objectstores and indexes | 1 Test the use of identical keypaths between objectstores and indexes |
| 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 = "index-duplicate-keypaths.html" | 6 dbname = "index-duplicate-keypaths.html" |
| 9 indexedDB.deleteDatabase(dbname) | 7 indexedDB.deleteDatabase(dbname) |
| 10 indexedDB.open(dbname) | 8 indexedDB.open(dbname) |
| 11 store = db.createObjectStore('collideWithIndex', {keyPath: 'foo'}) | 9 store = db.createObjectStore('collideWithIndex', {keyPath: 'foo'}) |
| 12 index = store.createIndex('foo', 'foo') | 10 index = store.createIndex('foo', 'foo') |
| 13 objectStore.put({foo: 10}) | 11 objectStore.put({foo: 10}) |
| 14 objectStore.get(10) | 12 objectStore.get(10) |
| 15 index.get(10) | 13 index.get(10) |
| 16 PASS JSON.stringify(result) is "{\"foo\":10}" | 14 PASS JSON.stringify(result) is "{\"foo\":10}" |
| 17 PASS JSON.stringify(result) is "{\"foo\":10}" | 15 PASS JSON.stringify(result) is "{\"foo\":10}" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 28 objectStore.put({'bar': 'baz'}) | 26 objectStore.put({'bar': 'baz'}) |
| 29 PASS event.target.result is 10 | 27 PASS event.target.result is 10 |
| 30 objectStore.get(10) | 28 objectStore.get(10) |
| 31 index.get(10) | 29 index.get(10) |
| 32 PASS JSON.stringify(result) is "{\"bar\":\"baz\",\"foo\":10}" | 30 PASS JSON.stringify(result) is "{\"bar\":\"baz\",\"foo\":10}" |
| 33 PASS JSON.stringify(result) is "{\"bar\":\"baz\",\"foo\":10}" | 31 PASS JSON.stringify(result) is "{\"bar\":\"baz\",\"foo\":10}" |
| 34 PASS successfullyParsed is true | 32 PASS successfullyParsed is true |
| 35 | 33 |
| 36 TEST COMPLETE | 34 TEST COMPLETE |
| 37 | 35 |
| OLD | NEW |