| OLD | NEW |
| 1 Test IndexedDB's create and removeObjectStore | 1 Test IndexedDB's create and removeObjectStore |
| 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 = "create-and-remove-object-store.html" | 8 dbname = "create-and-remove-object-store.html" |
| 9 indexedDB.deleteDatabase(dbname) | 9 indexedDB.deleteDatabase(dbname) |
| 10 indexedDB.open(dbname) | 10 indexedDB.open(dbname) |
| 11 db.createObjectStore('tmp') | 11 db.createObjectStore('tmp') |
| 12 Expecting exception from db.createObjectStore('tmp') | 12 Expecting exception from db.createObjectStore('tmp') |
| 13 PASS Exception was thrown. | 13 PASS Exception was thrown. |
| 14 PASS code is 0 | 14 PASS code is 0 |
| 15 PASS ename is 'ConstraintError' | 15 PASS ename is 'ConstraintError' |
| 16 Exception message: An object store with the specified name already exists. | 16 Exception message: Failed to execute 'createObjectStore' on 'IDBDatabase': An ob
ject store with the specified name already exists. |
| 17 trans = db.transaction(['tmp']) | 17 trans = db.transaction(['tmp']) |
| 18 trans.objectStore('tmp').get(0) | 18 trans.objectStore('tmp').get(0) |
| 19 PASS event.target.result is undefined. | 19 PASS event.target.result is undefined. |
| 20 Trying create | 20 Trying create |
| 21 Expecting exception from db.createObjectStore("some os") | 21 Expecting exception from db.createObjectStore("some os") |
| 22 PASS Exception was thrown. | 22 PASS Exception was thrown. |
| 23 PASS code is DOMException.INVALID_STATE_ERR | 23 PASS code is DOMException.INVALID_STATE_ERR |
| 24 PASS ename is 'InvalidStateError' | 24 PASS ename is 'InvalidStateError' |
| 25 Exception message: The database is not running a version change transaction. | 25 Exception message: Failed to execute 'createObjectStore' on 'IDBDatabase': The d
atabase is not running a version change transaction. |
| 26 Trying remove | 26 Trying remove |
| 27 Expecting exception from db.deleteObjectStore("some os") | 27 Expecting exception from db.deleteObjectStore("some os") |
| 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 'deleteObjectStore' on 'IDBDatabase': The d
atabase is not running a version change transaction. |
| 32 Trying create with store that already exists | 32 Trying create with store that already exists |
| 33 Expecting exception from db.createObjectStore('tmp') | 33 Expecting exception from db.createObjectStore('tmp') |
| 34 PASS Exception was thrown. | 34 PASS Exception was thrown. |
| 35 PASS code is DOMException.INVALID_STATE_ERR | 35 PASS code is DOMException.INVALID_STATE_ERR |
| 36 PASS ename is 'InvalidStateError' | 36 PASS ename is 'InvalidStateError' |
| 37 Exception message: The database is not running a version change transaction. | 37 Exception message: Failed to execute 'createObjectStore' on 'IDBDatabase': The d
atabase is not running a version change transaction. |
| 38 Trying remove with store that already exists | 38 Trying remove with store that already exists |
| 39 Expecting exception from db.deleteObjectStore('tmp') | 39 Expecting exception from db.deleteObjectStore('tmp') |
| 40 PASS Exception was thrown. | 40 PASS Exception was thrown. |
| 41 PASS code is DOMException.INVALID_STATE_ERR | 41 PASS code is DOMException.INVALID_STATE_ERR |
| 42 PASS ename is 'InvalidStateError' | 42 PASS ename is 'InvalidStateError' |
| 43 Exception message: The database is not running a version change transaction. | 43 Exception message: Failed to execute 'deleteObjectStore' on 'IDBDatabase': The d
atabase is not running a version change transaction. |
| 44 PASS successfullyParsed is true | 44 PASS successfullyParsed is true |
| 45 | 45 |
| 46 TEST COMPLETE | 46 TEST COMPLETE |
| 47 | 47 |
| OLD | NEW |