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

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: 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) => {
12 db.createObjectStore('s');
13 },
14 (t, db) => {
15 const tx = db.transaction('s');
16 const store = tx.objectStore('s');
17 const finish = pin_transaction(store);
18
19 setTimeout(t.step_func(() => {
pwnall 2016/10/14 07:57:05 Same concerns as for the first test in createObjec
jsbell 2016/10/17 19:42:03 Done, w/ tweaks.
20 assert_throws(
21 'InvalidStateError', () => { db.deleteObjectStore('s'); },
22 '"running an upgrade transaction" check (InvalidStateError) ' +
23 'should precede "not active" check (TransactionInactiveError)');
24
25 finish();
26 t.done();
27 }), 0);
28 },
29 'IDBDatabase.deleteObjectStore exception order: ' +
30 'InvalidStateError vs. TransactionInactiveError'
31 );
32
33 indexeddb_test(
34 (t, db) => {
35 const store = db.createObjectStore('s');
36 const finish = pin_transaction(store);
37
38 setTimeout(t.step_func(() => {
39 assert_throws(
pwnall 2016/10/14 07:57:05 Firefox Nightly 52.0a1 (2016-10-13) fails this che
jsbell 2016/10/17 19:42:03 Done, w/ tweaks.
40 'TransactionInactiveError', () => { db.deleteObjectStore('s'); },
pwnall 2016/10/14 07:57:04 I'm pretty sure we want to try to delete s2 here,
jsbell 2016/10/17 19:42:03 Done.
41 '"not active" check (TransactionInactiveError) should precede ' +
42 '"name in database" check (NotFoundError)');
43 finish();
44 t.done();
45 }), 0);
46 },
47 (t, db) => {},
48 'IDBDatabase.deleteObjectStore exception order: ' +
49 'TransactionInactiveError vs. NotFoundError'
50 );
51
52 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698