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

Unified Diff: third_party/WebKit/LayoutTests/storage/indexeddb/idbobjectstore-getAllKeys-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
Index: third_party/WebKit/LayoutTests/storage/indexeddb/idbobjectstore-getAllKeys-enforcerange.html
diff --git a/third_party/WebKit/LayoutTests/storage/indexeddb/idbobjectstore-getAllKeys-enforcerange.html b/third_party/WebKit/LayoutTests/storage/indexeddb/idbobjectstore-getAllKeys-enforcerange.html
new file mode 100644
index 0000000000000000000000000000000000000000..45d4843497cf302b8ee74adda08db2e535455cf1
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/storage/indexeddb/idbobjectstore-getAllKeys-enforcerange.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<title>IndexedDB: IDBIObjectStore getAllKeys() 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');
+ },
+ (t, db) => {
+ const tx = db.transaction('store');
+ const store = tx.objectStore('store');
+ [NaN, Infinity, -Infinity, -1, -Number.MAX_SAFE_INTEGER].forEach(count => {
+ assert_throws(TypeError(), () => { store.getAllKeys(null, count); },
+ `getAllKeys with count ${count} count should throw TypeError`);
+ });
+ t.done();
+ },
+ `IDBObjectStore.getAllKeys() uses [EnforceRange]`
+);
+</script>

Powered by Google App Engine
This is Rietveld 408576698