OLD | NEW |
1 Test IndexedDB deleteIndex method | 1 Test IndexedDB deleteIndex method |
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 = "deleteIndex.html" | 8 dbname = "deleteIndex.html" |
9 indexedDB.deleteDatabase(dbname) | 9 indexedDB.deleteDatabase(dbname) |
10 indexedDB.open(dbname) | 10 indexedDB.open(dbname) |
11 objectStore = db.createObjectStore('foo'); | 11 objectStore = db.createObjectStore('foo'); |
12 Expecting exception from objectStore.deleteIndex('first') | 12 Expecting exception from objectStore.deleteIndex('first') |
13 PASS Exception was thrown. | 13 PASS Exception was thrown. |
14 PASS code is DOMException.NOT_FOUND_ERR | 14 PASS code is DOMException.NOT_FOUND_ERR |
15 PASS ename is 'NotFoundError' | 15 PASS ename is 'NotFoundError' |
16 Exception message: The specified index was not found. | 16 Exception message: Failed to execute 'deleteIndex' on 'IDBObjectStore': The spec
ified index was not found. |
17 PASS objectStore.deleteIndex() threw exception TypeError: Failed to execute 'del
eteIndex' on 'IDBObjectStore': 1 argument required, but only 0 present.. | 17 PASS objectStore.deleteIndex() threw exception TypeError: Failed to execute 'del
eteIndex' on 'IDBObjectStore': 1 argument required, but only 0 present.. |
18 index = objectStore.createIndex('first', 'first'); | 18 index = objectStore.createIndex('first', 'first'); |
19 Expecting exception from objectStore.deleteIndex('FIRST') | 19 Expecting exception from objectStore.deleteIndex('FIRST') |
20 PASS Exception was thrown. | 20 PASS Exception was thrown. |
21 PASS code is DOMException.NOT_FOUND_ERR | 21 PASS code is DOMException.NOT_FOUND_ERR |
22 PASS ename is 'NotFoundError' | 22 PASS ename is 'NotFoundError' |
23 Exception message: The specified index was not found. | 23 Exception message: Failed to execute 'deleteIndex' on 'IDBObjectStore': The spec
ified index was not found. |
24 index = objectStore.createIndex('second', 'second'); | 24 index = objectStore.createIndex('second', 'second'); |
25 returnValue = objectStore.deleteIndex('first'); | 25 returnValue = objectStore.deleteIndex('first'); |
26 PASS returnValue is undefined | 26 PASS returnValue is undefined |
27 Expecting exception from db.createObjectStore('bar'); | 27 Expecting exception from db.createObjectStore('bar'); |
28 PASS Exception was thrown. | 28 PASS Exception was thrown. |
29 PASS code is DOMException.INVALID_STATE_ERR | 29 PASS code is DOMException.INVALID_STATE_ERR |
30 PASS ename is 'InvalidStateError' | 30 PASS ename is 'InvalidStateError' |
31 Exception message: The database is not running a version change transaction. | 31 Exception message: Failed to execute 'createObjectStore' on 'IDBDatabase': The d
atabase is not running a version change transaction. |
32 Expecting exception from objectStore.deleteIndex('second') | 32 Expecting exception from objectStore.deleteIndex('second') |
33 PASS Exception was thrown. | 33 PASS Exception was thrown. |
34 PASS code is 0 | 34 PASS code is 0 |
35 PASS ename is 'TransactionInactiveError' | 35 PASS ename is 'TransactionInactiveError' |
36 Exception message: The transaction has finished. | 36 Exception message: Failed to execute 'deleteIndex' on 'IDBObjectStore': The tran
saction has finished. |
37 PASS successfullyParsed is true | 37 PASS successfullyParsed is true |
38 | 38 |
39 TEST COMPLETE | 39 TEST COMPLETE |
40 | 40 |
OLD | NEW |