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

Unified Diff: third_party/WebKit/LayoutTests/storage/indexeddb/idbindex-getAll-enforcerange.html

Issue 2627453002: IDBObjectStore/IDBIndex.getAll/getAllKeys should have [EnforceRange] (Closed)
Patch Set: Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/storage/indexeddb/idbindex-getAllKeys-enforcerange.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/storage/indexeddb/idbindex-getAll-enforcerange.html
diff --git a/third_party/WebKit/LayoutTests/storage/indexeddb/idbindex-getAll-enforcerange.html b/third_party/WebKit/LayoutTests/storage/indexeddb/idbindex-getAll-enforcerange.html
new file mode 100644
index 0000000000000000000000000000000000000000..358c716fc6ea851ebe9d2391671567c729389375
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/storage/indexeddb/idbindex-getAll-enforcerange.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<title>IndexedDB: IDBIndex getAll() uses [EnforceRange]</title>
+<meta charset=utf-8>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script src="resources/testharness-helpers.js"></script>
+<script>
+
+indexeddb_test(
+ (t, db) => {
+ const store = db.createObjectStore('store');
+ const index = store.createIndex('index', 'keyPath');
+ },
+ (t, db) => {
+ const tx = db.transaction('store');
+ const store = tx.objectStore('store');
+ const index = store.index('index');
+ [NaN, Infinity, -Infinity, -1, -Number.MAX_SAFE_INTEGER].forEach(count => {
+ assert_throws(TypeError(), () => { index.getAll(null, count); },
+ `getAll with count ${count} count should throw TypeError`);
+ });
+ t.done();
+ },
+ `IDBIndex.getAll() uses [EnforceRange]`
+);
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/storage/indexeddb/idbindex-getAllKeys-enforcerange.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698