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

Side by Side Diff: third_party/WebKit/LayoutTests/storage/indexeddb/idbdatabase-deleteObjectStore-exception-order.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 <title>IndexedDB: IDBDatabase deleteObjectStore() Exception Ordering</title> 2 <title>IndexedDB: IDBDatabase deleteObjectStore() Exception Ordering</title>
3 <meta charset=utf-8> 3 <meta charset=utf-8>
4 <link rel="help" href="https://w3c.github.io/IndexedDB/#dom-idbdatabase-deleteob jectstore"> 4 <link rel="help" href="https://w3c.github.io/IndexedDB/#dom-idbdatabase-deleteob jectstore">
5 <script src="../../resources/testharness.js"></script> 5 <script src="../../resources/testharness.js"></script>
6 <script src="../../resources/testharnessreport.js"></script> 6 <script src="../../resources/testharnessreport.js"></script>
7 <script src="resources/testharness-helpers.js"></script> 7 <script src="resources/testharness-helpers.js"></script>
8 <script> 8 <script>
9 setup({allow_uncaught_exception: true});
9 10
10 indexeddb_test( 11 indexeddb_test(
11 (t, db, req) => { 12 (t, db, req) => {
12 db.createObjectStore('s'); 13 db.createObjectStore('s');
13 req.transaction.onabort = () => { 14 req.transaction.onabort = () => {
14 setTimeout(t.step_func(() => { 15 setTimeout(t.step_func(() => {
15 assert_throws( 16 assert_throws(
16 'InvalidStateError', () => { db.deleteObjectStore('s'); }, 17 'InvalidStateError', () => { db.deleteObjectStore('s'); },
17 '"running an upgrade transaction" check (InvalidStateError) ' + 18 '"running an upgrade transaction" check (InvalidStateError) ' +
18 'should precede "not active" check (TransactionInactiveError)'); 19 'should precede "not active" check (TransactionInactiveError)');
(...skipping 17 matching lines...) Expand all
36 '"not active" check (TransactionInactiveError) should precede ' + 37 '"not active" check (TransactionInactiveError) should precede ' +
37 '"name in database" check (NotFoundError)'); 38 '"name in database" check (NotFoundError)');
38 t.done(); 39 t.done();
39 }, 40 },
40 (t, db) => { t.assert_unreached('open should fail'); }, 41 (t, db) => { t.assert_unreached('open should fail'); },
41 'IDBDatabase.deleteObjectStore exception order: ' + 42 'IDBDatabase.deleteObjectStore exception order: ' +
42 'TransactionInactiveError vs. NotFoundError' 43 'TransactionInactiveError vs. NotFoundError'
43 ); 44 );
44 45
45 </script> 46 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698