OLD | NEW |
1 Test IndexedDB's basics. | 1 Test IndexedDB's basics. |
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; | 6 indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.
msIndexedDB || self.OIndexedDB; |
7 | 7 |
8 dbname = "createIndex-after-failure.html" | 8 dbname = "createIndex-after-failure.html" |
9 indexedDB.deleteDatabase(dbname) | 9 indexedDB.deleteDatabase(dbname) |
10 indexedDB.open(dbname) | 10 indexedDB.open(dbname) |
11 objectStore.createIndex('index', 'key', {unique: true}) | 11 objectStore.createIndex('index', 'key', {unique: true}) |
12 objectStore.deleteIndex('index') | 12 objectStore.deleteIndex('index') |
13 Expecting exception from objectStore.deleteIndex('index') | 13 Expecting exception from objectStore.deleteIndex('index') |
14 PASS Exception was thrown. | 14 PASS Exception was thrown. |
15 PASS code is DOMException.NOT_FOUND_ERR | 15 PASS code is DOMException.NOT_FOUND_ERR |
16 PASS ename is 'NotFoundError' | 16 PASS ename is 'NotFoundError' |
17 Exception message: The specified index was not found. | 17 Exception message: Failed to execute 'deleteIndex' on 'IDBObjectStore': The spec
ified index was not found. |
18 Now requesting object2 | 18 Now requesting object2 |
19 now we wait. | 19 now we wait. |
20 deleteIndexAfterGet() | 20 deleteIndexAfterGet() |
21 Expecting exception from objectStore.deleteIndex('index') | 21 Expecting exception from objectStore.deleteIndex('index') |
22 PASS Exception was thrown. | 22 PASS Exception was thrown. |
23 PASS code is DOMException.NOT_FOUND_ERR | 23 PASS code is DOMException.NOT_FOUND_ERR |
24 PASS ename is 'NotFoundError' | 24 PASS ename is 'NotFoundError' |
25 Exception message: The specified index was not found. | 25 Exception message: Failed to execute 'deleteIndex' on 'IDBObjectStore': The spec
ified index was not found. |
26 Expecting exception from objectStore.deleteIndex('index') | 26 Expecting exception from objectStore.deleteIndex('index') |
27 PASS Exception was thrown. | 27 PASS Exception was thrown. |
28 PASS code is DOMException.NOT_FOUND_ERR | 28 PASS code is DOMException.NOT_FOUND_ERR |
29 PASS ename is 'NotFoundError' | 29 PASS ename is 'NotFoundError' |
30 Exception message: The specified index was not found. | 30 Exception message: Failed to execute 'deleteIndex' on 'IDBObjectStore': The spec
ified index was not found. |
31 PASS successfullyParsed is true | 31 PASS successfullyParsed is true |
32 | 32 |
33 TEST COMPLETE | 33 TEST COMPLETE |
34 | 34 |
OLD | NEW |