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; | |
7 | |
8 dbname = "create-and-remove-object-store.html" | 6 dbname = "create-and-remove-object-store.html" |
9 indexedDB.deleteDatabase(dbname) | 7 indexedDB.deleteDatabase(dbname) |
10 indexedDB.open(dbname) | 8 indexedDB.open(dbname) |
11 db.createObjectStore('tmp') | 9 db.createObjectStore('tmp') |
12 Expecting exception from db.createObjectStore('tmp') | 10 Expecting exception from db.createObjectStore('tmp') |
13 PASS Exception was thrown. | 11 PASS Exception was thrown. |
14 PASS code is 0 | 12 PASS code is 0 |
15 PASS ename is 'ConstraintError' | 13 PASS ename is 'ConstraintError' |
16 Exception message: Failed to execute 'createObjectStore' on 'IDBDatabase': An ob
ject store with the specified name already exists. | 14 Exception message: Failed to execute 'createObjectStore' on 'IDBDatabase': An ob
ject store with the specified name already exists. |
17 trans = db.transaction(['tmp']) | 15 trans = db.transaction(['tmp']) |
(...skipping 20 matching lines...) Expand all Loading... |
38 Trying remove with store that already exists | 36 Trying remove with store that already exists |
39 Expecting exception from db.deleteObjectStore('tmp') | 37 Expecting exception from db.deleteObjectStore('tmp') |
40 PASS Exception was thrown. | 38 PASS Exception was thrown. |
41 PASS code is DOMException.INVALID_STATE_ERR | 39 PASS code is DOMException.INVALID_STATE_ERR |
42 PASS ename is 'InvalidStateError' | 40 PASS ename is 'InvalidStateError' |
43 Exception message: Failed to execute 'deleteObjectStore' on 'IDBDatabase': The d
atabase is not running a version change transaction. | 41 Exception message: Failed to execute 'deleteObjectStore' on 'IDBDatabase': The d
atabase is not running a version change transaction. |
44 PASS successfullyParsed is true | 42 PASS successfullyParsed is true |
45 | 43 |
46 TEST COMPLETE | 44 TEST COMPLETE |
47 | 45 |
OLD | NEW |