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

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/IndexedDB/idbindex-getAllKeys-enforcerange.html

Issue 2664623002: Upstream an assortment of IndexedDB tests to WPT. (Closed)
Patch Set: Rebase MANIFEST.json. Created 3 years, 10 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
1 <!DOCTYPE html> 1 <!doctype html>
2 <meta charset=utf-8>
2 <title>IndexedDB: IDBIndex getAllKeys() uses [EnforceRange]</title> 3 <title>IndexedDB: IDBIndex getAllKeys() uses [EnforceRange]</title>
3 <meta charset=utf-8> 4 <link rel="help" href="https://w3c.github.io/IndexedDB/#index-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 const index = store.createIndex('index', 'keyPath'); 13 const index = store.createIndex('index', 'keyPath');
13 }, 14 },
14 (t, db) => { 15 (t, db) => {
15 const tx = db.transaction('store'); 16 const tx = db.transaction('store');
16 const store = tx.objectStore('store'); 17 const store = tx.objectStore('store');
17 const index = store.index('index'); 18 const index = store.index('index');
18 [NaN, Infinity, -Infinity, -1, -Number.MAX_SAFE_INTEGER].forEach(count => { 19 [NaN, Infinity, -Infinity, -1, -Number.MAX_SAFE_INTEGER].forEach(count => {
19 assert_throws(TypeError(), () => { index.getAllKeys(null, count); }, 20 assert_throws(TypeError(), () => { index.getAllKeys(null, count); },
20 `getAllKeys with count ${count} count should throw TypeError `); 21 `getAllKeys with count ${count} count should throw TypeError `);
21 }); 22 });
22 t.done(); 23 t.done();
23 }, 24 },
24 `IDBIndex.getAllKeys() uses [EnforceRange]` 25 `IDBIndex.getAllKeys() uses [EnforceRange]`
25 ); 26 );
26 </script> 27 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698