OLD | NEW |
1 Ensure pending open waits for version change transaction to complete. | 1 Ensure pending open waits for version change transaction to complete. |
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 = "version-change-exclusive.html" | 8 dbname = "version-change-exclusive.html" |
9 indexedDB.deleteDatabase(dbname) | 9 indexedDB.deleteDatabase(dbname) |
10 indexedDB.open(dbname) | 10 indexedDB.open(dbname) |
11 calling open() - callback should wait until VERSION_CHANGE transaction is comple
te | 11 calling open() - callback should wait until VERSION_CHANGE transaction is comple
te |
12 indexedDB.open(dbname) | 12 indexedDB.open(dbname) |
13 setVersion() callback | 13 setVersion() callback |
14 starting work in VERSION_CHANGE transaction | 14 starting work in VERSION_CHANGE transaction |
15 self.state = 'VERSION_CHANGE started' | 15 self.state = 'VERSION_CHANGE started' |
16 store = db.createObjectStore('test-store') | 16 store = db.createObjectStore('test-store') |
17 Expecting exception from db.transaction('test-store') | 17 Expecting exception from db.transaction('test-store') |
18 PASS Exception was thrown. | 18 PASS Exception was thrown. |
19 PASS code is DOMException.INVALID_STATE_ERR | 19 PASS code is DOMException.INVALID_STATE_ERR |
20 PASS ename is 'InvalidStateError' | 20 PASS ename is 'InvalidStateError' |
| 21 Exception message: A version change transaction is running. |
21 store.put(0, 0) | 22 store.put(0, 0) |
22 in put's onsuccess | 23 in put's onsuccess |
23 store.put(1, 1) | 24 store.put(1, 1) |
24 in put's onsuccess | 25 in put's onsuccess |
25 store.put(2, 2) | 26 store.put(2, 2) |
26 in put's onsuccess | 27 in put's onsuccess |
27 store.put(3, 3) | 28 store.put(3, 3) |
28 in put's onsuccess | 29 in put's onsuccess |
29 store.put(4, 4) | 30 store.put(4, 4) |
30 in put's onsuccess | 31 in put's onsuccess |
31 store.put(5, 5) | 32 store.put(5, 5) |
32 in put's onsuccess | 33 in put's onsuccess |
33 store.put(6, 6) | 34 store.put(6, 6) |
34 in put's onsuccess | 35 in put's onsuccess |
35 store.put(7, 7) | 36 store.put(7, 7) |
36 in put's onsuccess | 37 in put's onsuccess |
37 store.put(8, 8) | 38 store.put(8, 8) |
38 in put's onsuccess | 39 in put's onsuccess |
39 store.put(9, 9) | 40 store.put(9, 9) |
40 in put's onsuccess | 41 in put's onsuccess |
41 ending work in VERSION_CHANGE transaction | 42 ending work in VERSION_CHANGE transaction |
42 self.state = 'VERSION_CHANGE finished' | 43 self.state = 'VERSION_CHANGE finished' |
43 open() callback - this should appear after VERSION_CHANGE transaction ends | 44 open() callback - this should appear after VERSION_CHANGE transaction ends |
44 PASS self.state is "VERSION_CHANGE finished" | 45 PASS self.state is "VERSION_CHANGE finished" |
45 PASS successfullyParsed is true | 46 PASS successfullyParsed is true |
46 | 47 |
47 TEST COMPLETE | 48 TEST COMPLETE |
48 | 49 |
OLD | NEW |