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

Side by Side Diff: third_party/WebKit/LayoutTests/storage/indexeddb/idbdatabase-deleteObjectStore-exception-order.html

Issue 2538343002: De-flake IndexedDB layout tests. (Closed)
Patch Set: Rebased. Created 4 years 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
« no previous file with comments | « third_party/WebKit/LayoutTests/storage/indexeddb/idbdatabase-createObjectStore-exception-order.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 9
10 indexeddb_test( 10 indexeddb_test(
11 (t, db, req) => { 11 (t, db, req) => {
12 db.createObjectStore('s'); 12 db.createObjectStore('s');
13 req.transaction.onabort = () => {
14 setTimeout(t.step_func(() => {
15 assert_throws(
16 'InvalidStateError', () => { db.deleteObjectStore('s'); },
17 '"running an upgrade transaction" check (InvalidStateError) ' +
18 'should precede "not active" check (TransactionInactiveError)');
19 t.done();
20 }), 0);
21 };
22 req.onerror = null;
13 req.transaction.abort(); 23 req.transaction.abort();
14 req.onerror = null;
15 setTimeout(t.step_func(() => {
16 assert_throws(
17 'InvalidStateError', () => { db.deleteObjectStore('s'); },
18 '"running an upgrade transaction" check (InvalidStateError) ' +
19 'should precede "not active" check (TransactionInactiveError)');
20 t.done();
21 }), 0);
22 }, 24 },
23 (t, db) => { t.assert_unreached('open should fail'); }, 25 (t, db) => { t.assert_unreached('open should fail'); },
24 'IDBDatabase.deleteObjectStore exception order: ' + 26 'IDBDatabase.deleteObjectStore exception order: ' +
25 'InvalidStateError vs. TransactionInactiveError' 27 'InvalidStateError vs. TransactionInactiveError'
26 ); 28 );
27 29
28 indexeddb_test( 30 indexeddb_test(
29 (t, db, req) => { 31 (t, db, req) => {
32 req.onerror = null;
30 req.transaction.abort(); 33 req.transaction.abort();
31 req.onerror = null;
32 assert_throws( 34 assert_throws(
33 'TransactionInactiveError', () => { db.deleteObjectStore('nope'); }, 35 'TransactionInactiveError', () => { db.deleteObjectStore('nope'); },
34 '"not active" check (TransactionInactiveError) should precede ' + 36 '"not active" check (TransactionInactiveError) should precede ' +
35 '"name in database" check (NotFoundError)'); 37 '"name in database" check (NotFoundError)');
36 t.done(); 38 t.done();
37 }, 39 },
38 (t, db) => { t.assert_unreached('open should fail'); }, 40 (t, db) => { t.assert_unreached('open should fail'); },
39 'IDBDatabase.deleteObjectStore exception order: ' + 41 'IDBDatabase.deleteObjectStore exception order: ' +
40 'TransactionInactiveError vs. NotFoundError' 42 'TransactionInactiveError vs. NotFoundError'
41 ); 43 );
42 44
43 </script> 45 </script>
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/storage/indexeddb/idbdatabase-createObjectStore-exception-order.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698