OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <title>IndexedDB: index renaming support in aborted transactions</title> | 2 <title>IndexedDB: index renaming support in aborted transactions</title> |
3 <script src='../../resources/testharness.js'></script> | |
4 <link rel="help" | 3 <link rel="help" |
5 href="https://w3c.github.io/IndexedDB/#dom-idbindex-name"> | 4 href="https://w3c.github.io/IndexedDB/#dom-idbindex-name"> |
6 <link rel="author" href="pwnall@chromium.org" title="Victor Costan"> | 5 <link rel="author" href="pwnall@chromium.org" title="Victor Costan"> |
7 <script src='../../resources/testharnessreport.js'></script> | 6 <script src="/resources/testharness.js"></script> |
8 <script src='resources/rename-common.js'></script> | 7 <script src="/resources/testharnessreport.js"></script> |
| 8 <script src="support-promises.js"></script> |
9 <script> | 9 <script> |
10 | 10 |
11 promise_test(testCase => { | 11 promise_test(testCase => { |
12 const dbName = databaseName(testCase); | 12 const dbName = databaseName(testCase); |
13 let authorIndex = null, authorIndex2 = null; | 13 let authorIndex = null, authorIndex2 = null; |
14 return createDatabase(testCase, (database, transaction) => { | 14 return createDatabase(testCase, (database, transaction) => { |
15 createBooksStore(testCase, database); | 15 createBooksStore(testCase, database); |
16 }).then(database => { | 16 }).then(database => { |
17 database.close(); | 17 database.close(); |
18 }).then(() => migrateDatabase(testCase, 2, (database, transaction) => { | 18 }).then(() => migrateDatabase(testCase, 2, (database, transaction) => { |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 assert_array_equals( | 101 assert_array_equals( |
102 store.indexNames, ['not_by_author', 'not_by_title'], | 102 store.indexNames, ['not_by_author', 'not_by_title'], |
103 'IDBDatabase.objectStoreNames should not reflect the creation or ' + | 103 'IDBDatabase.objectStoreNames should not reflect the creation or ' + |
104 'the rename after the versionchange transaction is aborted'); | 104 'the rename after the versionchange transaction is aborted'); |
105 | 105 |
106 database.close(); | 106 database.close(); |
107 }); | 107 }); |
108 }, 'IndexedDB index creation and rename in an aborted transaction'); | 108 }, 'IndexedDB index creation and rename in an aborted transaction'); |
109 | 109 |
110 </script> | 110 </script> |
OLD | NEW |