OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <title>IndexedDB: aborting transactions reverts multiple operations on the same
metadata</title> | 2 <title>IndexedDB: aborting transactions reverts multiple operations on the same
metadata</title> |
3 <script src='../../resources/testharness.js'></script> | |
4 <link rel="help" href="https://w3c.github.io/IndexedDB/#abort-transaction"> | 3 <link rel="help" href="https://w3c.github.io/IndexedDB/#abort-transaction"> |
5 <link rel="author" href="pwnall@chromium.org" title="Victor Costan"> | 4 <link rel="author" href="pwnall@chromium.org" title="Victor Costan"> |
6 <script src='../../resources/testharnessreport.js'></script> | 5 <script src="/resources/testharness.js"></script> |
7 <script src='resources/rename-common.js'></script> | 6 <script src="/resources/testharnessreport.js"></script> |
| 7 <script src="support-promises.js"></script> |
8 <script> | 8 <script> |
9 | 9 |
10 promise_test(testCase => { | 10 promise_test(testCase => { |
11 let store = null, index = null; | 11 let store = null, index = null; |
12 let migrationTransaction = null, migrationDatabase = null; | 12 let migrationTransaction = null, migrationDatabase = null; |
13 return createDatabase(testCase, (database, transaction) => { | 13 return createDatabase(testCase, (database, transaction) => { |
14 createBooksStore(testCase, database); | 14 createBooksStore(testCase, database); |
15 }).then(database => { | 15 }).then(database => { |
16 database.close(); | 16 database.close(); |
17 }).then(() => migrateDatabase(testCase, 2, (database, transaction) => { | 17 }).then(() => migrateDatabase(testCase, 2, (database, transaction) => { |
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 'created store after the transaction is aborted'); | 282 'created store after the transaction is aborted'); |
283 assert_array_equals( | 283 assert_array_equals( |
284 store.indexNames, [], | 284 store.indexNames, [], |
285 'IDBObjectStore.indexNames should be empty after the transaction ' + | 285 'IDBObjectStore.indexNames should be empty after the transaction ' + |
286 'is aborted'); | 286 'is aborted'); |
287 }); | 287 }); |
288 }, 'Deleted indexes in created+deleted stores are still marked as deleted ' + | 288 }, 'Deleted indexes in created+deleted stores are still marked as deleted ' + |
289 'after their transaction aborts'); | 289 'after their transaction aborts'); |
290 | 290 |
291 </script> | 291 </script> |
OLD | NEW |