summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/service-workers/service-worker/tentative/static-router/static-router-invalid-rules.https.html
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:33 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:33 +0000
commit086c044dc34dfc0f74fbe41f4ecb402b2cd34884 (patch)
treea4f824bd33cb075dd5aa3eb5a0a94af221bbe83a /testing/web-platform/tests/service-workers/service-worker/tentative/static-router/static-router-invalid-rules.https.html
parentAdding debian version 124.0.1-1. (diff)
downloadfirefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.tar.xz
firefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.zip
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/service-workers/service-worker/tentative/static-router/static-router-invalid-rules.https.html')
-rw-r--r--testing/web-platform/tests/service-workers/service-worker/tentative/static-router/static-router-invalid-rules.https.html20
1 files changed, 18 insertions, 2 deletions
diff --git a/testing/web-platform/tests/service-workers/service-worker/tentative/static-router/static-router-invalid-rules.https.html b/testing/web-platform/tests/service-workers/service-worker/tentative/static-router/static-router-invalid-rules.https.html
index 4ed4ad4b3c..9ef7cfdc9f 100644
--- a/testing/web-platform/tests/service-workers/service-worker/tentative/static-router/static-router-invalid-rules.https.html
+++ b/testing/web-platform/tests/service-workers/service-worker/tentative/static-router/static-router-invalid-rules.https.html
@@ -15,8 +15,10 @@
const ROUTER_RULE_KEY_INVALID_REQUEST_METHOD =
'condition-invalid-request-method';
-const ROUTER_RULE_KEY_SOURCE_FETCH_EVENT =
- 'condition-request-source-fetch-event';
+const ROUTER_RULE_KEY_INVALID_OR_CONDITION_DEPTH =
+ 'condition-invalid-or-condition-depth';
+const ROUTER_RULE_KEY_INVALID_ROUTER_SIZE =
+ 'condition-invalid-router-size';
promise_test(async t => {
const worker = await registerAndActivate(t, ROUTER_RULE_KEY_INVALID_REQUEST_METHOD);
@@ -25,5 +27,19 @@ promise_test(async t => {
assert_equals(errors.length, 1);
}, 'addRoutes should raise for invalid request method.');
+promise_test(async t => {
+ const worker = await registerAndActivate(t, ROUTER_RULE_KEY_INVALID_OR_CONDITION_DEPTH);
+ t.add_cleanup(() => {reset_info_in_worker(worker)});
+ const {errors} = await get_info_from_worker(worker);
+ assert_equals(errors.length, 1);
+}, 'addRoutes should raise if or condition exceeds the depth limit');
+
+promise_test(async t => {
+ const worker = await registerAndActivate(t, ROUTER_RULE_KEY_INVALID_ROUTER_SIZE);
+ t.add_cleanup(() => {reset_info_in_worker(worker)});
+ const {errors} = await get_info_from_worker(worker);
+ assert_equals(errors.length, 1);
+}, 'addRoutes should raise if the number of router rules exceeds the length limit');
+
</script>
</body>