| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!doctype html> |
| 2 <meta charset=utf-8> |
| 2 <title>IndexedDB: IDBObjectStore add()/put() Exception Ordering</title> | 3 <title>IndexedDB: IDBObjectStore add()/put() Exception Ordering</title> |
| 3 <meta charset=utf-8> | 4 <link rel="help" href="https://w3c.github.io/IndexedDB/#dom-idbobjectstore-put"> |
| 4 <link rel="help" href="https://w3c.github.io/IndexedDB/#dom-idbobjectstore-add"> | 5 <link rel="help" href="https://w3c.github.io/IndexedDB/#dom-idbobjectstore-add"> |
| 5 <link rel="help" href="https://w3c.github.io/IndexedDB/#dom-idbobjectstore-put"> | 6 <script src="/resources/testharness.js"></script> |
| 6 <script src="../../resources/testharness.js"></script> | 7 <script src="/resources/testharnessreport.js"></script> |
| 7 <script src="../../resources/testharnessreport.js"></script> | 8 <script src="support.js"></script> |
| 8 <script src="resources/testharness-helpers.js"></script> | |
| 9 <script> | 9 <script> |
| 10 | 10 |
| 11 ['add', 'put'].forEach(method => { | 11 ['put', 'add'].forEach(method => { |
| 12 indexeddb_test( | 12 indexeddb_test( |
| 13 (t, db) => { | 13 (t, db) => { |
| 14 const store = db.createObjectStore('s'); | 14 const store = db.createObjectStore('s'); |
| 15 const store2 = db.createObjectStore('s2'); | 15 const store2 = db.createObjectStore('s2'); |
| 16 | 16 |
| 17 db.deleteObjectStore('s2'); | 17 db.deleteObjectStore('s2'); |
| 18 | 18 |
| 19 setTimeout(t.step_func(() => { | 19 setTimeout(t.step_func(() => { |
| 20 assert_throws( | 20 assert_throws( |
| 21 'InvalidStateError', () => { store2[method]('key', 'value'); }, | 21 'InvalidStateError', () => { store2[method]('key', 'value'); }, |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 | 65 |
| 66 t.done(); | 66 t.done(); |
| 67 }, | 67 }, |
| 68 | 68 |
| 69 `IDBObjectStore.${method} exception order: ` + | 69 `IDBObjectStore.${method} exception order: ` + |
| 70 'ReadOnlyError vs. DataError' | 70 'ReadOnlyError vs. DataError' |
| 71 ); | 71 ); |
| 72 }); | 72 }); |
| 73 | 73 |
| 74 </script> | 74 </script> |
| OLD | NEW |