| OLD | NEW |
| (Empty) | |
| 1 <!DOCTYPE html> |
| 2 <title>IndexedDB: IDBDatabase createObjectStore() Exception Ordering</title> |
| 3 <link rel="help" href="https://w3c.github.io/IndexedDB/#dom-idbdatabase-createob
jectstore"> |
| 4 <script src="../../resources/testharness.js"></script> |
| 5 <script src="../../resources/testharnessreport.js"></script> |
| 6 <script src="resources/testharness-helpers.js"></script> |
| 7 |
| 8 <script> |
| 9 |
| 10 indexeddb_test( |
| 11 function(t, db) { |
| 12 db.createObjectStore('s'); |
| 13 assert_throws('SyntaxError', function() { |
| 14 db.createObjectStore('s', {keyPath: 'not a valid key path'}); |
| 15 }, '"Invalid keyath" check (SyntaxError) should precede ' + |
| 16 '"duplicate store name" check (ConstraintError)'); |
| 17 t.done(); |
| 18 }, |
| 19 function(t, db) {}, |
| 20 'IDBDatabase.createObjectStore exception order: ConstraintError vs. SyntaxEr
ror' |
| 21 ); |
| 22 |
| 23 </script> |
| OLD | NEW |