| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!doctype html> |
| 2 <meta charset=utf-8> |
| 2 <title>IndexedDB: IDBTransaction objectStore() Exception Ordering</title> | 3 <title>IndexedDB: IDBTransaction objectStore() Exception Ordering</title> |
| 3 <meta charset=utf-8> | |
| 4 <link rel="help" href="https://w3c.github.io/IndexedDB/#dom-idbtransaction-objec
tstore"> | 4 <link rel="help" href="https://w3c.github.io/IndexedDB/#dom-idbtransaction-objec
tstore"> |
| 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="support.js"></script> |
| 8 <script> | 8 <script> |
| 9 | 9 |
| 10 indexeddb_test( | 10 indexeddb_test( |
| 11 (t, db) => { | 11 (t, db) => { |
| 12 const store = db.createObjectStore('s'); | 12 const store = db.createObjectStore('s'); |
| 13 }, | 13 }, |
| 14 (t, db) => { | 14 (t, db) => { |
| 15 const tx = db.transaction('s'); | 15 const tx = db.transaction('s'); |
| 16 tx.oncomplete = t.step_func(() => { | 16 tx.oncomplete = t.step_func(() => { |
| 17 assert_throws('InvalidStateError', () => { tx.objectStore('nope'); }, | 17 assert_throws('InvalidStateError', () => { tx.objectStore('nope'); }, |
| 18 '"finished" check (InvalidStateError) should precede ' + | 18 '"finished" check (InvalidStateError) should precede ' + |
| 19 '"name in scope" check (NotFoundError)'); | 19 '"name in scope" check (NotFoundError)'); |
| 20 t.done(); | 20 t.done(); |
| 21 }); | 21 }); |
| 22 }, | 22 }, |
| 23 'IDBTransaction.objectStore exception order: InvalidStateError vs. NotFoundErr
or' | 23 'IDBTransaction.objectStore exception order: InvalidStateError vs. NotFoundErr
or' |
| 24 ); | 24 ); |
| 25 | 25 |
| 26 </script> | 26 </script> |
| OLD | NEW |