From e4e47bf5cab6f72beeeaa31ac7964e97ff1f7480 Mon Sep 17 00:00:00 2001 From: Marco Castelluccio Date: Sat, 16 Nov 2024 01:53:07 +0000 Subject: [PATCH] Bug 1930022 [wpt PR 49047] - Move Chromium implementation specific WPT., a=testonly Automatic update from web-platform-tests Move Chromium implementation specific WPT. The specification does not define the maximum depth/width. However, the current WPT limit them. Let me move such WPTs to Chromium specific locations. In the coming CL, I will also write the WPT to ask the minimum depth/width as a response to: https://github.com/w3c/ServiceWorker/pull/1714 Change-Id: I722667fbdc69aed32d8fa66d3e17050bf33c480a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5999015 Reviewed-by: Keita Suzuki Reviewed-by: Shunya Shishido Commit-Queue: Yoshisato Yanagisawa Cr-Commit-Position: refs/heads/main{#1380071} -- wpt-commits: af915520cc0da850f5031cdfb5172657ab7091a4 wpt-pr: 49047 UltraBlame original commit: aa8a7fd4f293aa1f757f821c7fb13fd0cb381b4a --- .../service-worker/resources/router-rules.js | 271 ------------------ .../static-router-invalid-rules.https.html | 247 ---------------- 2 files changed, 518 deletions(-) diff --git a/testing/web-platform/tests/service-workers/service-worker/resources/router-rules.js b/testing/web-platform/tests/service-workers/service-worker/resources/router-rules.js index a206a155cb61f..d338854baa726 100644 --- a/testing/web-platform/tests/service-workers/service-worker/resources/router-rules.js +++ b/testing/web-platform/tests/service-workers/service-worker/resources/router-rules.js @@ -5,62 +5,6 @@ TEST_CACHE_NAME v1 ' ; -/ -/ -The -value -is -coming -from -: -/ -/ -https -: -/ -/ -source -. -chromium -. -org -/ -chromium -/ -chromium -/ -src -/ -+ -/ -main -: -third_party -/ -blink -/ -public -/ -common -/ -service_worker -/ -service_worker_router_rule -. -h -; -l -= -28 -; -drc -= -6f3f85b321146cfc0f9eb81a74c7c2257821461e -const -CONDITION_MAX_RECURSION_DEPTH -= -10 -; const routerRules = @@ -707,221 +651,6 @@ network ' condition - -invalid -- -or -- -condition -- -depth -' -: -( -( -) -= -> -{ -const -addOrCondition -= -( -depth -) -= -> -{ -if -( -depth -> -CONDITION_MAX_RECURSION_DEPTH -) -{ -return -{ -urlPattern -: -' -/ -foo -' -} -; -} -return -{ -or -: -[ -addOrCondition -( -depth -+ -1 -) -] -} -; -} -; -return -{ -condition -: -addOrCondition -( -1 -) -source -: -' -network -' -} -; -} -) -( -) -' -condition -- -invalid -- -not -- -condition -- -depth -' -: -( -( -) -= -> -{ -const -generateNotCondition -= -( -depth -) -= -> -{ -if -( -depth -> -CONDITION_MAX_RECURSION_DEPTH -) -{ -return -{ -urlPattern -: -' -/ -* -* -/ -example -. -txt -' -} -; -} -return -{ -not -: -generateNotCondition -( -depth -+ -1 -) -} -; -} -; -return -{ -condition -: -generateNotCondition -( -1 -) -source -: -' -network -' -} -; -} -) -( -) -' -condition -- -invalid -- -router -- -size -' -: -[ -. -. -. -Array -( -512 -) -] -. -map -( -( -val -i -) -= -> -{ -return -{ -condition -: -{ -urlPattern -: -/ -foo -- -{ -i -} -} -source -: -' -network -' -} -; -} -) -' -condition -- request - destination diff --git a/testing/web-platform/tests/service-workers/service-worker/static-router-invalid-rules.https.html b/testing/web-platform/tests/service-workers/service-worker/static-router-invalid-rules.https.html index fd35ac200b91a..4e74bcc98b74e 100644 --- a/testing/web-platform/tests/service-workers/service-worker/static-router-invalid-rules.https.html +++ b/testing/web-platform/tests/service-workers/service-worker/static-router-invalid-rules.https.html @@ -158,49 +158,6 @@ ' ; const -ROUTER_RULE_KEY_INVALID_OR_CONDITION_DEPTH -= -' -condition -- -invalid -- -or -- -condition -- -depth -' -; -const -ROUTER_RULE_KEY_INVALID_NOT_CONDITION_DEPTH -= -' -condition -- -invalid -- -not -- -condition -- -depth -' -; -const -ROUTER_RULE_KEY_INVALID_ROUTER_SIZE -= -' -condition -- -invalid -- -router -- -size -' -; -const ROUTER_RULE_KEY_LACK_OF_CONDITION = ' @@ -305,210 +262,6 @@ 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_NOT_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 -not -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 -' -) -; -promise_test -( -async -t -= -> -{ -const -worker -= -await -registerAndActivate -( -t ROUTER_RULE_KEY_LACK_OF_CONDITION ) ;