OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <title>IndexedDB: object store renaming error handling</title> | 2 <title>IndexedDB: object store renaming error handling</title> |
3 <script src='../../resources/testharness.js'></script> | |
4 <link rel="help" | 3 <link rel="help" |
5 href="https://w3c.github.io/IndexedDB/#dom-idbobjectstore-name"> | 4 href="https://w3c.github.io/IndexedDB/#dom-idbobjectstore-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 return createDatabase(testCase, (database, transaction) => { | 12 return createDatabase(testCase, (database, transaction) => { |
13 createBooksStore(testCase, database); | 13 createBooksStore(testCase, database); |
14 }).then(database => { | 14 }).then(database => { |
15 database.close(); | 15 database.close(); |
16 }).then(() => migrateDatabase(testCase, 2, (database, transaction) => { | 16 }).then(() => migrateDatabase(testCase, 2, (database, transaction) => { |
17 const store = transaction.objectStore('books'); | 17 const store = transaction.objectStore('books'); |
18 database.deleteObjectStore('books'); | 18 database.deleteObjectStore('books'); |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 const transaction = database.transaction('books', 'readonly'); | 109 const transaction = database.transaction('books', 'readonly'); |
110 const store = transaction.objectStore('books'); | 110 const store = transaction.objectStore('books'); |
111 return checkStoreContents( | 111 return checkStoreContents( |
112 testCase, store, | 112 testCase, store, |
113 'Committing a transaction with a failed rename attempt should ' + | 113 'Committing a transaction with a failed rename attempt should ' + |
114 "not change the store's contents").then(() => database.close()); | 114 "not change the store's contents").then(() => database.close()); |
115 }); | 115 }); |
116 }, 'IndexedDB object store rename handles exceptions when stringifying names'); | 116 }, 'IndexedDB object store rename handles exceptions when stringifying names'); |
117 | 117 |
118 </script> | 118 </script> |
OLD | NEW |