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

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

Issue 2415203002: Indexed DB: More exception precedence tests (Closed)
Patch Set: Review feedback - no more tx pinning, tweaked store create/delete tests to satisfy FF Created 4 years, 2 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
(Empty)
1 <!DOCTYPE html>
2 <title>IndexedDB: IDBDatabase deleteObjectStore() Exception Ordering</title>
3 <meta charset=utf-8>
4 <link rel="help" href="https://w3c.github.io/IndexedDB/#dom-idbdatabase-deleteob jectstore">
5 <script src="../../resources/testharness.js"></script>
6 <script src="../../resources/testharnessreport.js"></script>
7 <script src="resources/testharness-helpers.js"></script>
8 <script>
9
10 indexeddb_test(
11 (t, db, req) => {
12 db.createObjectStore('s');
13 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 },
23 (t, db) => { t.assert_unreached('open should fail'); },
24 'IDBDatabase.deleteObjectStore exception order: ' +
25 'InvalidStateError vs. TransactionInactiveError'
26 );
27
28 indexeddb_test(
29 (t, db, req) => {
30 req.transaction.abort();
31 req.onerror = null;
32 assert_throws(
33 'TransactionInactiveError', () => { db.deleteObjectStore('nope'); },
34 '"not active" check (TransactionInactiveError) should precede ' +
35 '"name in database" check (NotFoundError)');
36 t.done();
37 },
38 (t, db) => { t.assert_unreached('open should fail'); },
39 'IDBDatabase.deleteObjectStore exception order: ' +
40 'TransactionInactiveError vs. NotFoundError'
41 );
42
43 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698