Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(21)

Side by Side Diff: third_party/WebKit/LayoutTests/storage/indexeddb/upgrade-transaction-lifecycle-microtasks.html

Issue 1362953003: Fire window.onerror for uncaught IndexedDB errors (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <!doctype html> 1 <!doctype html>
2 <meta charset="utf8"> 2 <meta charset="utf8">
3 <title>IndexedDB: versionchange transaction lifecycle</title> 3 <title>IndexedDB: versionchange transaction lifecycle</title>
4 <!-- These tests cannot yet be upstreamed to WPT because they rely on microtask 4 <!-- These tests cannot yet be upstreamed to WPT because they rely on microtask
5 sequencing, which was not fully specified yet. --> 5 sequencing, which was not fully specified yet. -->
6 <link rel="help" 6 <link rel="help"
7 href="https://w3c.github.io/IndexedDB/#upgrade-transaction-steps"> 7 href="https://w3c.github.io/IndexedDB/#upgrade-transaction-steps">
8 <link rel="help" 8 <link rel="help"
9 href="https://w3c.github.io/IndexedDB/#dom-idbdatabase-createobjectstore"> 9 href="https://w3c.github.io/IndexedDB/#dom-idbdatabase-createobjectstore">
10 <link rel="help" 10 <link rel="help"
11 href="https://w3c.github.io/IndexedDB/#dom-idbdatabase-deleteobjectstore"> 11 href="https://w3c.github.io/IndexedDB/#dom-idbdatabase-deleteobjectstore">
12 <link rel="author" href="pwnall@chromium.org" title="Victor Costan"> 12 <link rel="author" href="pwnall@chromium.org" title="Victor Costan">
13 <script src="../../resources/testharness.js"></script> 13 <script src="../../resources/testharness.js"></script>
14 <script src="../../resources/testharnessreport.js"></script> 14 <script src="../../resources/testharnessreport.js"></script>
15 <script src="resources/support-promises.js"></script> 15 <script src="resources/support-promises.js"></script>
16 <script> 16 <script>
17 'use strict'; 17 'use strict';
18 setup({allow_uncaught_exception: true});
18 19
19 promise_test(t => { 20 promise_test(t => {
20 return createDatabase(t, database => { 21 return createDatabase(t, database => {
21 createBooksStore(t, database); 22 createBooksStore(t, database);
22 }).then(database => { 23 }).then(database => {
23 database.close(); 24 database.close();
24 }).then(() => migrateDatabase(t, 2, (database, transaction, request) => { 25 }).then(() => migrateDatabase(t, 2, (database, transaction, request) => {
25 let abortFired = false; 26 let abortFired = false;
26 const abortPromise = new Promise((resolve, reject) => { 27 const abortPromise = new Promise((resolve, reject) => {
27 transaction.addEventListener('abort', () => { 28 transaction.addEventListener('abort', () => {
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 'InvalidStateError', 183 'InvalidStateError',
183 () => { database.deleteObjectStore('books'); }, 184 () => { database.deleteObjectStore('books'); },
184 'deleteObjectStore exception should reflect that the transaction ' + 185 'deleteObjectStore exception should reflect that the transaction ' +
185 'is no longer running'); 186 'is no longer running');
186 }); 187 });
187 })).then(database => { database.close(); }); 188 })).then(database => { database.close(); });
188 }, 'in a promise microtask after the complete event is fired for a committed ' + 189 }, 'in a promise microtask after the complete event is fired for a committed ' +
189 'transaction'); 190 'transaction');
190 191
191 </script> 192 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698