OLD | NEW |
1 <!DOCTYPE html> | 1 <!doctype html> |
| 2 <meta charset="utf8"> |
2 <title>IndexedDB: aborting transactions reverts index metadata</title> | 3 <title>IndexedDB: aborting transactions reverts index metadata</title> |
3 <link rel="help" href="https://w3c.github.io/IndexedDB/#abort-transaction"> | 4 <link rel="help" href="https://w3c.github.io/IndexedDB/#abort-transaction"> |
4 <link rel="author" href="pwnall@chromium.org" title="Victor Costan"> | 5 <link rel="author" href="pwnall@chromium.org" title="Victor Costan"> |
5 <script src="/resources/testharness.js"></script> | 6 <script src="/resources/testharness.js"></script> |
6 <script src="/resources/testharnessreport.js"></script> | 7 <script src="/resources/testharnessreport.js"></script> |
7 <script src="support-promises.js"></script> | 8 <script src="support-promises.js"></script> |
8 <script> | 9 <script> |
| 10 'use strict'; |
9 | 11 |
10 promise_test(testCase => { | 12 promise_test(testCase => { |
11 let store = null, index = null; | 13 let store = null, index = null; |
12 return createDatabase(testCase, (database, transaction) => { | 14 return createDatabase(testCase, (database, transaction) => { |
13 createBooksStore(testCase, database); | 15 createBooksStore(testCase, database); |
14 }).then(database => { | 16 }).then(database => { |
15 database.close(); | 17 database.close(); |
16 }).then(() => migrateDatabase(testCase, 2, (database, transaction) => { | 18 }).then(() => migrateDatabase(testCase, 2, (database, transaction) => { |
17 store = createNotBooksStore(testCase, database); | 19 store = createNotBooksStore(testCase, database); |
18 index = store.index('not_by_author'); | 20 index = store.index('not_by_author'); |
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 'aborted'); | 269 'aborted'); |
268 assert_array_equals( | 270 assert_array_equals( |
269 store.indexNames, ['not_by_author', 'not_by_title'], | 271 store.indexNames, ['not_by_author', 'not_by_title'], |
270 'IDBObjectStore.indexNames should stop including the newly ' + | 272 'IDBObjectStore.indexNames should stop including the newly ' + |
271 'created index after the transaction is aborted'); | 273 'created index after the transaction is aborted'); |
272 }); | 274 }); |
273 }, 'Created+deleted indexes are still marked as deleted after their ' + | 275 }, 'Created+deleted indexes are still marked as deleted after their ' + |
274 'transaction aborts'); | 276 'transaction aborts'); |
275 | 277 |
276 </script> | 278 </script> |
OLD | NEW |