OLD | NEW |
1 Test IndexedDB 'steps for closing a database connection' | 1 Test IndexedDB 'steps for closing a database connection' |
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 = "database-close.html" | 6 dbname = "database-close.html" |
9 indexedDB.deleteDatabase(dbname) | 7 indexedDB.deleteDatabase(dbname) |
10 indexedDB.open(dbname) | 8 indexedDB.open(dbname) |
11 store = connection.createObjectStore('store') | 9 store = connection.createObjectStore('store') |
12 store.put('value1', 'key1') | 10 store.put('value1', 'key1') |
13 store.put('value2', 'key2') | 11 store.put('value2', 'key2') |
14 | 12 |
15 testClose(): | 13 testClose(): |
16 Create transactions using connection: | 14 Create transactions using connection: |
17 trans1 = connection.transaction('store') | 15 trans1 = connection.transaction('store') |
(...skipping 27 matching lines...) Expand all Loading... |
45 PASS event.target.result is "value2" | 43 PASS event.target.result is "value2" |
46 | 44 |
47 All transactions completed - database deletes should now be unblocked. | 45 All transactions completed - database deletes should now be unblocked. |
48 | 46 |
49 delete database unblocked | 47 delete database unblocked |
50 PASS awaiting_transaction_count is 0 | 48 PASS awaiting_transaction_count is 0 |
51 PASS successfullyParsed is true | 49 PASS successfullyParsed is true |
52 | 50 |
53 TEST COMPLETE | 51 TEST COMPLETE |
54 | 52 |
OLD | NEW |