Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

Commit 5ca3876

Browse files
SteveBeckerMSFTmoz-wptsync-bot
authored andcommitted
Bug 1975043 [wpt PR 53514] - [IndexedDB] Add WPT coverage for get all operations with invalid keys, a=testonly
Automatic update from web-platform-tests [IndexedDB] Add WPT coverage for get all operations with invalid keys Creates a new WPT test helper function in IndexedDB/resources/support-get-all.js, which runs a get all operation on an object store or index using invalid query keys. Each get all operation must fail to create a request by throwing an exception. The change then updates all get all operation permutations to run this test. The change adds WPTs to support this W3C spec PR: w3c/IndexedDB#461 Bug: 40746016 Change-Id: I86549cd8a2ca46e028174e5f140cb640d5f1efdb Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6685595 Reviewed-by: Rahul Singh <rahsin@microsoft.com> Commit-Queue: Steve Becker <stevebe@microsoft.com> Cr-Commit-Position: refs/heads/main@{#1481178} -- wpt-commits: 0da72ce8b1a202a2c09c135e43785a104b7cf59e wpt-pr: 53514
1 parent c6a83c7 commit 5ca3876

11 files changed

+84
-0
lines changed

testing/web-platform/tests/IndexedDB/idbindex_getAll-options.tentative.any.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,3 +118,7 @@ index_get_all_values_with_options_test(
118118
get_all_with_options_and_count_test(
119119
'getAll', /*storeName=*/ 'out-of-line', /*indexName=*/ 'test_idx',
120120
'Get all values with both options and count');
121+
122+
get_all_with_invalid_keys_test(
123+
'getAll', /*storeName=*/ 'out-of-line', /*indexName=*/ 'test_idx',
124+
/*shouldUseDictionary=*/ true, 'Get all values with invalid query keys');

testing/web-platform/tests/IndexedDB/idbindex_getAll.any.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,3 +84,7 @@ index_get_all_values_test(
8484
index_get_all_values_test(
8585
/*storeName=*/ 'out-of-line-multi', /*options=*/ {query: 'vowel'},
8686
'Retrieve one key multiple values');
87+
88+
get_all_with_invalid_keys_test(
89+
'getAll', /*storeName=*/ 'out-of-line', /*indexName=*/ 'test_idx',
90+
/*shouldUseDictionary=*/ false, 'Get all values with invalid query keys');

testing/web-platform/tests/IndexedDB/idbindex_getAllKeys-options.tentative.any.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,3 +117,7 @@ index_get_all_keys_with_options_test(
117117
get_all_with_options_and_count_test(
118118
'getAllKeys', /*storeName=*/ 'out-of-line', /*indexName=*/ 'test_idx',
119119
'Get all keys with both options and count');
120+
121+
get_all_with_invalid_keys_test(
122+
'getAllKeys', /*storeName=*/ 'out-of-line', /*indexName=*/ 'test_idx',
123+
/*shouldUseDictionary=*/ true, 'Get all keys with invalid query keys');

testing/web-platform/tests/IndexedDB/idbindex_getAllKeys.any.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,3 +83,7 @@ index_get_all_keys_test(
8383
index_get_all_keys_test(
8484
/*storeName=*/ 'out-of-line-multi',
8585
/*options=*/ {query: 'vowel'}, 'Retrieve one key multiple values');
86+
87+
get_all_with_invalid_keys_test(
88+
'getAllKeys', /*storeName=*/ 'out-of-line', /*indexName=*/ 'test_idx',
89+
/*shouldUseDictionary=*/ false, 'Get all keys with invalid query keys');

testing/web-platform/tests/IndexedDB/idbindex_getAllRecords.tentative.any.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,3 +119,7 @@ index_get_all_records_test(
119119
count: 4
120120
},
121121
'Direction, query and count');
122+
123+
get_all_with_invalid_keys_test(
124+
'getAllRecords', /*storeName=*/ 'out-of-line', /*indexName=*/ 'test_idx',
125+
/*shouldUseDictionary=*/ true, 'Get all records with invalid query keys');

testing/web-platform/tests/IndexedDB/idbobjectstore_getAll-options.tentative.any.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,3 +113,7 @@ object_store_get_all_values_with_options_test(
113113
get_all_with_options_and_count_test(
114114
'getAll', /*storeName=*/ 'out-of-line', /*indexName=*/ undefined,
115115
'Get all values with both options and count');
116+
117+
get_all_with_invalid_keys_test(
118+
'getAll', /*storeName=*/ 'out-of-line', /*indexName=*/ undefined,
119+
/*shouldUseDictionary=*/ true, 'Get all values with invalid query keys');

testing/web-platform/tests/IndexedDB/idbobjectstore_getAll.any.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,3 +100,7 @@ object_store_get_all_test_setup(
100100
transaction.oncomplete = test.step_func_done();
101101
});
102102
}, 'Get all values with transaction.commit()');
103+
104+
get_all_with_invalid_keys_test(
105+
'getAll', /*storeName=*/ 'out-of-line', /*indexName=*/ undefined,
106+
/*shouldUseDictionary=*/ false, 'Get all values with invalid query keys');

testing/web-platform/tests/IndexedDB/idbobjectstore_getAllKeys-options.tentative.any.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,3 +109,7 @@ object_store_get_all_keys_with_options_test(
109109
get_all_with_options_and_count_test(
110110
'getAllKeys', /*storeName=*/ 'out-of-line', /*indexName=*/ undefined,
111111
'Get all keys with both options and count');
112+
113+
get_all_with_invalid_keys_test(
114+
'getAllKeys', /*storeName=*/ 'out-of-line', /*indexName=*/ undefined,
115+
/*shouldUseDictionary=*/ true, 'Get all keys with invalid query keys');

testing/web-platform/tests/IndexedDB/idbobjectstore_getAllKeys.any.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,3 +74,7 @@ object_store_get_all_keys_test(
7474
/*storeName=*/ 'out-of-line',
7575
/*options=*/ {query: IDBKeyRange.lowerBound('zz')},
7676
'Query with empty range where lowerBound < last key');
77+
78+
get_all_with_invalid_keys_test(
79+
'getAllKeys', /*storeName=*/ 'out-of-line', /*indexName=*/ undefined,
80+
/*shouldUseDictionary=*/ false, 'Get all keys with invalid query keys');

testing/web-platform/tests/IndexedDB/idbobjectstore_getAllRecords.tentative.any.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,3 +135,7 @@ object_store_get_all_test_setup(
135135
test.done();
136136
});
137137
}, 'Get all records with transaction.commit()');
138+
139+
get_all_with_invalid_keys_test(
140+
'getAllRecords', /*storeName=*/ 'out-of-line', /*indexName=*/ undefined,
141+
/*shouldUseDictionary=*/ true, 'Get all records with invalid query keys');

0 commit comments

Comments
 (0)