OLD | NEW |
1 Test IndexedDB behavior adding the same property twice | 1 Test IndexedDB behavior adding the same property twice |
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 = "add-twice-failure.html" | 6 dbname = "add-twice-failure.html" |
9 indexedDB.deleteDatabase(dbname) | 7 indexedDB.deleteDatabase(dbname) |
10 indexedDB.open(dbname) | 8 indexedDB.open(dbname) |
11 objectStore = db.createObjectStore('foo'); | 9 objectStore = db.createObjectStore('foo'); |
12 key = 10 | 10 key = 10 |
13 request = objectStore.add({}, key); | 11 request = objectStore.add({}, key); |
14 PASS request.result is key | 12 PASS request.result is key |
15 request = objectStore.add({}, key); | 13 request = objectStore.add({}, key); |
16 PASS event.target.result is undefined. | 14 PASS event.target.result is undefined. |
17 PASS event.target.error is non-null. | 15 PASS event.target.error is non-null. |
18 PASS event.target.error.name is 'ConstraintError' | 16 PASS event.target.error.name is 'ConstraintError' |
19 PASS successfullyParsed is true | 17 PASS successfullyParsed is true |
20 | 18 |
21 TEST COMPLETE | 19 TEST COMPLETE |
22 | 20 |
OLD | NEW |