1 Test the use of identical keypaths between objectstores and indexes
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
6 dbname = "index-duplicate-keypaths.html"
7 indexedDB.deleteDatabase(dbname)
9 store = db.createObjectStore('collideWithIndex', {keyPath: 'foo'})
10 index = store.createIndex('foo', 'foo')
11 objectStore.put({foo: 10})
14 PASS JSON.stringify(result) is "{\"foo\":10}"
15 PASS JSON.stringify(result) is "{\"foo\":10}"
17 request = indexedDB.open(dbname, 2)
18 Deleted all object stores.
19 store = db.createObjectStore('collideWithAutoIncrement', {keyPath: 'foo', autoIncrement: true})
20 index = store.createIndex('foo', 'foo')
21 objectStore.put({foo:5})
22 objectStore.put({foo:6})
23 objectStore.put({foo:7})
24 objectStore.put({foo:8})
25 objectStore.put({foo:9})
26 objectStore.put({'bar': 'baz'})
27 PASS event.target.result is 10
30 PASS JSON.stringify(result) is "{\"bar\":\"baz\",\"foo\":10}"
31 PASS JSON.stringify(result) is "{\"bar\":\"baz\",\"foo\":10}"
32 PASS successfullyParsed is true