OLD | NEW |
1 <!DOCTYPE html> | 1 <!doctype html> |
| 2 <meta charset="utf8"> |
2 <title>IndexedDB: aborting transactions reverts object store metadata</title> | 3 <title>IndexedDB: aborting transactions reverts object store 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, migrationTransaction = null, migrationDatabase = null; | 13 let store = null, migrationTransaction = null, migrationDatabase = 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 migrationDatabase = database; | 20 migrationDatabase = database; |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 'deleted store after the transaction is aborted'); | 226 'deleted store after the transaction is aborted'); |
225 assert_array_equals( | 227 assert_array_equals( |
226 migrationTransaction.objectStoreNames, ['books', 'not_books'], | 228 migrationTransaction.objectStoreNames, ['books', 'not_books'], |
227 'IDBTransaction.objectStoreNames should include the previously ' + | 229 'IDBTransaction.objectStoreNames should include the previously ' + |
228 'deleted store after the transaction is aborted'); | 230 'deleted store after the transaction is aborted'); |
229 }); | 231 }); |
230 }, 'Un-instantiated deleted stores get marked as not-deleted after the ' + | 232 }, 'Un-instantiated deleted stores get marked as not-deleted after the ' + |
231 'transaction aborts'); | 233 'transaction aborts'); |
232 | 234 |
233 </script> | 235 </script> |
OLD | NEW |