| 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 PASS objectStore.deleteIndex() threw exception TypeError: Not enough arguments. | 17 PASS objectStore.deleteIndex() threw exception TypeError: Not enough arguments. |
| 17 index = objectStore.createIndex('first', 'first'); | 18 index = objectStore.createIndex('first', 'first'); |
| 18 Expecting exception from objectStore.deleteIndex('FIRST') | 19 Expecting exception from objectStore.deleteIndex('FIRST') |
| 19 PASS Exception was thrown. | 20 PASS Exception was thrown. |
| 20 PASS code is DOMException.NOT_FOUND_ERR | 21 PASS code is DOMException.NOT_FOUND_ERR |
| 21 PASS ename is 'NotFoundError' | 22 PASS ename is 'NotFoundError' |
| 23 Exception message: The specified index was not found. |
| 22 index = objectStore.createIndex('second', 'second'); | 24 index = objectStore.createIndex('second', 'second'); |
| 23 returnValue = objectStore.deleteIndex('first'); | 25 returnValue = objectStore.deleteIndex('first'); |
| 24 PASS returnValue is undefined | 26 PASS returnValue is undefined |
| 25 Expecting exception from db.createObjectStore('bar'); | 27 Expecting exception from db.createObjectStore('bar'); |
| 26 PASS Exception was thrown. | 28 PASS Exception was thrown. |
| 27 PASS code is DOMException.INVALID_STATE_ERR | 29 PASS code is DOMException.INVALID_STATE_ERR |
| 28 PASS ename is 'InvalidStateError' | 30 PASS ename is 'InvalidStateError' |
| 31 Exception message: The database is not running a version change transaction. |
| 29 Expecting exception from objectStore.deleteIndex('second') | 32 Expecting exception from objectStore.deleteIndex('second') |
| 30 PASS Exception was thrown. | 33 PASS Exception was thrown. |
| 31 PASS code is 0 | 34 PASS code is 0 |
| 32 PASS ename is 'TransactionInactiveError' | 35 PASS ename is 'TransactionInactiveError' |
| 36 Exception message: The transaction has finished. |
| 33 PASS successfullyParsed is true | 37 PASS successfullyParsed is true |
| 34 | 38 |
| 35 TEST COMPLETE | 39 TEST COMPLETE |
| 36 | 40 |
| OLD | NEW |