1 Verify that you can put the same data in 2 different databases without uniqueness constraints firing. 2 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". 4 5 6 webkitIndexedDB.open('duplicates-1') 7 db = event.target.result 8 db.setVersion('new version') 9 setVersionSuccess(): 10 trans = event.target.result 11 PASS trans !== null is true 12 Deleted all object stores. 13 db.createObjectStore('storeName', null) 14 store.createIndex('indexName', 'x') 15 store.add({x: 'value', y: 'zzz'}, 'key') 16 event.target.source.add({x: 'value2', y: 'zzz2'}, 'key2') 17 indexObject.getKey('value') 18 PASS event.target.result is "key" 19 indexObject.get('value') 20 PASS event.target.result.x is "value" 21 PASS event.target.result.y is "zzz" 22 indexObject.getKey('does not exist') 23 PASS event.target.errorCode is webkitIDBDatabaseException.NOT_FOUND_ERR 24 event.preventDefault() 25 indexObject.get('does not exist') 26 PASS event.target.errorCode is webkitIDBDatabaseException.NOT_FOUND_ERR 27 event.preventDefault() 28 indexObject.openKeyCursor() 29 PASS event.target.result === null is false 30 PASS event.target.result.key is "value" 31 PASS event.target.result.primaryKey is "key" 32 event.target.result.continue() 33 PASS event.target.result === null is false 34 PASS event.target.result.key is "value2" 35 PASS event.target.result.primaryKey is "key2" 36 event.target.result.continue() 37 PASS event.target.result === null is true 38 indexObject.openCursor() 39 PASS event.target.result === null is false 40 PASS event.target.result.key is "value" 41 PASS event.target.result.value.x is "value" 42 PASS event.target.result.value.y is "zzz" 43 event.target.result.continue() 44 PASS event.target.result === null is false 45 PASS event.target.result.key is "value2" 46 PASS event.target.result.value.x is "value2" 47 PASS event.target.result.value.y is "zzz2" 48 event.target.result.continue() 49 PASS event.target.result === null is true 50 webkitIndexedDB.open('duplicates-2') 51 db = event.target.result 52 db.setVersion('new version') 53 setVersionSuccess(): 54 trans = event.target.result 55 PASS trans !== null is true 56 Deleted all object stores. 57 db.createObjectStore('storeName', null) 58 store.createIndex('indexName', 'x') 59 store.add({x: 'value', y: 'zzz'}, 'key') 60 event.target.source.add({x: 'value2', y: 'zzz2'}, 'key2') 61 indexObject.getKey('value') 62 PASS event.target.result is "key" 63 indexObject.get('value') 64 PASS event.target.result.x is "value" 65 PASS event.target.result.y is "zzz" 66 indexObject.getKey('does not exist') 67 PASS event.target.errorCode is webkitIDBDatabaseException.NOT_FOUND_ERR 68 event.preventDefault() 69 indexObject.get('does not exist') 70 PASS event.target.errorCode is webkitIDBDatabaseException.NOT_FOUND_ERR 71 event.preventDefault() 72 indexObject.openKeyCursor() 73 PASS event.target.result === null is false 74 PASS event.target.result.key is "value" 75 PASS event.target.result.primaryKey is "key" 76 event.target.result.continue() 77 PASS event.target.result === null is false 78 PASS event.target.result.key is "value2" 79 PASS event.target.result.primaryKey is "key2" 80 event.target.result.continue() 81 PASS event.target.result === null is true 82 indexObject.openCursor() 83 PASS event.target.result === null is false 84 PASS event.target.result.key is "value" 85 PASS event.target.result.value.x is "value" 86 PASS event.target.result.value.y is "zzz" 87 event.target.result.continue() 88 PASS event.target.result === null is false 89 PASS event.target.result.key is "value2" 90 PASS event.target.result.value.x is "value2" 91 PASS event.target.result.value.y is "zzz2" 92 event.target.result.continue() 93 PASS event.target.result === null is true 94 PASS successfullyParsed is true 95 96 TEST COMPLETE 97 98