chromium/third_party/blink/web_tests/storage/indexeddb/duplicates-expected.txt

Verify that you can put the same data in 2 different databases without uniqueness constraints firing.

On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".

dbname = "duplicates.html-1"
indexedDB.deleteDatabase(dbname)
indexedDB.open(dbname)
db.createObjectStore('storeName', null)
store.createIndex('indexName', 'x')
store.add({x: 'value', y: 'zzz'}, 'key')
event.target.source.add({x: 'value2', y: 'zzz2'}, 'key2')
indexObject.getKey('value')
PASS event.target.result is "key"
indexObject.get('value')
PASS event.target.result.x is "value"
PASS event.target.result.y is "zzz"
indexObject.getKey('does not exist')
PASS event.target.result is undefined
indexObject.get('does not exist')
PASS event.target.result is undefined
indexObject.openKeyCursor()
PASS event.target.result is non-null.
PASS event.target.result.key is "value"
PASS event.target.result.primaryKey is "key"
event.target.result.continue()
PASS event.target.result is non-null.
PASS event.target.result.key is "value2"
PASS event.target.result.primaryKey is "key2"
event.target.result.continue()
PASS event.target.result is null
indexObject.openCursor()
PASS event.target.result is non-null.
PASS event.target.result.key is "value"
PASS event.target.result.value.x is "value"
PASS event.target.result.value.y is "zzz"
event.target.result.continue()
PASS event.target.result is non-null.
PASS event.target.result.key is "value2"
PASS event.target.result.value.x is "value2"
PASS event.target.result.value.y is "zzz2"
event.target.result.continue()
PASS event.target.result is null
dbname = "duplicates.html-2"
indexedDB.deleteDatabase(dbname)
indexedDB.open(dbname)
db.createObjectStore('storeName', null)
store.createIndex('indexName', 'x')
store.add({x: 'value', y: 'zzz'}, 'key')
event.target.source.add({x: 'value2', y: 'zzz2'}, 'key2')
indexObject.getKey('value')
PASS event.target.result is "key"
indexObject.get('value')
PASS event.target.result.x is "value"
PASS event.target.result.y is "zzz"
indexObject.getKey('does not exist')
PASS event.target.result is undefined
indexObject.get('does not exist')
PASS event.target.result is undefined
indexObject.openKeyCursor()
PASS event.target.result is non-null.
PASS event.target.result.key is "value"
PASS event.target.result.primaryKey is "key"
event.target.result.continue()
PASS event.target.result is non-null.
PASS event.target.result.key is "value2"
PASS event.target.result.primaryKey is "key2"
event.target.result.continue()
PASS event.target.result is null
indexObject.openCursor()
PASS event.target.result is non-null.
PASS event.target.result.key is "value"
PASS event.target.result.value.x is "value"
PASS event.target.result.value.y is "zzz"
event.target.result.continue()
PASS event.target.result is non-null.
PASS event.target.result.key is "value2"
PASS event.target.result.value.x is "value2"
PASS event.target.result.value.y is "zzz2"
event.target.result.continue()
PASS event.target.result is null
PASS successfullyParsed is true

TEST COMPLETE