OLD | NEW |
1 <!DOCTYPE html> | 1 <!doctype html> |
| 2 <meta charset=utf-8> |
2 <title>IndexedDB: IDBIObjectStore getAllKeys() uses [EnforceRange]</title> | 3 <title>IndexedDB: IDBIObjectStore getAllKeys() uses [EnforceRange]</title> |
3 <meta charset=utf-8> | 4 <link rel="help" href="https://w3c.github.io/IndexedDB/#object-store-interface"> |
4 <script src="../../resources/testharness.js"></script> | 5 <script src="/resources/testharness.js"></script> |
5 <script src="../../resources/testharnessreport.js"></script> | 6 <script src="/resources/testharnessreport.js"></script> |
6 <script src="resources/testharness-helpers.js"></script> | 7 <script src="support.js"></script> |
7 <script> | 8 <script> |
8 | 9 |
9 indexeddb_test( | 10 indexeddb_test( |
10 (t, db) => { | 11 (t, db) => { |
11 const store = db.createObjectStore('store'); | 12 const store = db.createObjectStore('store'); |
12 }, | 13 }, |
13 (t, db) => { | 14 (t, db) => { |
14 const tx = db.transaction('store'); | 15 const tx = db.transaction('store'); |
15 const store = tx.objectStore('store'); | 16 const store = tx.objectStore('store'); |
16 [NaN, Infinity, -Infinity, -1, -Number.MAX_SAFE_INTEGER].forEach(count => { | 17 [NaN, Infinity, -Infinity, -1, -Number.MAX_SAFE_INTEGER].forEach(count => { |
17 assert_throws(TypeError(), () => { store.getAllKeys(null, count); }, | 18 assert_throws(TypeError(), () => { store.getAllKeys(null, count); }, |
18 `getAllKeys with count ${count} count should throw TypeError
`); | 19 `getAllKeys with count ${count} count should throw TypeError
`); |
19 }); | 20 }); |
20 t.done(); | 21 t.done(); |
21 }, | 22 }, |
22 `IDBObjectStore.getAllKeys() uses [EnforceRange]` | 23 `IDBObjectStore.getAllKeys() uses [EnforceRange]` |
23 ); | 24 ); |
24 </script> | 25 </script> |
OLD | NEW |