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