From f6f41638ff8db36b658c5d65ecb2cae7f7b7c103 Mon Sep 17 00:00:00 2001 From: Sam Sneddon Date: Mon, 23 Sep 2024 16:46:25 -0700 Subject: [PATCH] Start running the parsed file lints against support files This is largely motivated by ensuring that people aren't including testharnessreport.js in support files which are then included via fetch_tests_from_window, and most of the files changed here are removing redundant inclusions here. We also find a few other errors, such as testdriver-vendor.js being omitted and invalid values for , which are also fixed. Finally, add a few things to the allowlist. --- .../resources/protocol_handlers_entry.html | 1 - .../embedded-popup-expect-hints.html | 1 - .../embedded-popup-expect-no-hints.html | 1 - .../resources/support-iframe.html | 1 - .../support/frame-in-frame.sub.html | 1 - .../support/test_csp_self_window.sub.html | 1 - .../partitioned-cookies-cross-site-embed.html | 1 - ...artitioned-cookies-top-level-redirect.html | 1 - .../third-party-cookies-cross-site-embed.html | 1 - .../automatic-beacon-unfenced-page.html | 1 - .../background-fetch-inner.https.html | 1 - .../background-fetch-sw-inner.https.html | 1 - .../background-sync-inner.https.html | 1 - .../background-sync-sw-inner.https.html | 1 - ...child-fenced-frame-onload-event-inner.html | 1 - ...cestor-from-nested-fenced-frame.https.html | 1 - ...ate-ancestor-from-nested-iframe.https.html | 1 - .../navigate-ancestor-test-runner.https.html | 1 - .../permission-geolocation-test-runner.html | 1 - .../window-navigation-204-inner.html | 1 - ...network-partition-about-blank-checker.html | 1 - .../resources/network-partition-checker.html | 1 - .../network-partition-iframe-checker.html | 1 - .../network-partition-worker-checker.html | 1 - .../split-cache-popup-with-iframe.html | 1 - .../resources/split-cache-popup.html | 1 - ...s-event-after-switching-iframes-inner.html | 1 + .../order-in-prerender-activation-popup.html | 1 - .../observer-in-iframe-subframe.html | 1 - lint.ignore | 33 +++++++++++++++++++ .../resources/404-with-early-hints.html | 1 - .../arbitrary-header-in-early-hints.html | 1 - .../early-hints/resources/coep-mismatch.html | 1 - loading/early-hints/resources/csp-basic.html | 1 - .../resources/csp-document-disallow.html | 1 - .../modulepreload-in-early-hints.html | 1 - .../multiple-early-hints-responses.html | 1 - .../resources/preconnect-in-early-hints.html | 1 - .../resources/preload-as-test.html | 1 - .../early-hints/resources/preload-fetch.html | 1 - .../resources/preload-fetchpriority.html | 1 - ...reload-finished-before-final-response.html | 1 - ...d-while-receiving-final-response-body.html | 1 - .../preload-in-flight-when-consumed.html | 1 - .../resources/preload-initiator-type.html | 1 - ...rect-cross-origin-between-early-hints.html | 1 - .../resources/redirect-cross-origin.html | 1 - ...irect-same-origin-between-early-hints.html | 1 - .../resources/redirect-same-origin.html | 1 - .../resources/referrer-policy-test.html | 1 - ...redirect-with-cookie-header.sub.https.html | 1 - .../redirect-chain-start.sub.https.html | 1 + .../resources/going-back.html | 1 - .../controlling-ua/support/iframe.html | 1 - ...st_onconnectionavailable_receiving-ua.html | 1 - ...tationConnection_onclose_receiving-ua.html | 1 - ...tionConnection_onmessage_receiving-ua.html | 1 - ...sentationReceiver_create_receiving-ua.html | 1 - ...ionReceiver_create_receiving-ua_child.html | 1 - ...tationReceiver_unreached_receiving-ua.html | 1 - .../support/idlharness_receiving-ua.html | 1 - .../resources/frameset-timing-frame.html | 1 - .../resources/samesite-sw-helper.html | 1 - .../resources/claim-with-redirect-iframe.html | 1 - .../clients-get-cross-origin-frame.html | 1 - ...selection-operation-limit-inner.https.html | 1 - ...et-in-sandboxed-frame-inner.https.sub.html | 1 - .../select-url-permissions-policy-helper.html | 1 - ...red-storage-permissions-policy-helper.html | 1 - .../resources/about-blank-iframes.html | 1 - .../resources/audio-setSinkId.https.html | 1 - .../resources/background-fetch.https.html | 1 - .../resources/background-sync.https.html | 1 - .../resources/battery-status.https.html | 1 - .../resources/bluetooth-access.https.html | 1 - .../resources/broadcast-channel.html | 1 - .../resources/cross-origin-iframe.html | 1 - .../cross-origin-isolated-iframe.https.html | 1 - .../cross-origin-isolated.https.html | 1 - ...ipt-src-elem-inline-speculation-rules.html | 1 - ...p-script-src-inline-speculation-rules.html | 1 - .../resources/csp-script-src-self.html | 1 - .../csp-script-src-strict-dynamic.html | 1 - .../csp-script-src-unsafe-inline.html | 1 - .../resources/dedicated-worker.https.html | 1 - .../resources/encrypted-media.https.html | 1 - .../fetch-intercepted-by-service-worker.html | 1 - .../prerender/resources/file-picker.html | 1 - .../resources/generic-sensor.https.html | 1 - .../resources/idle-detection.https.html | 1 - .../iframe-added-post-activation.html | 1 - .../resources/main-frame-navigation.html | 1 - .../resources/media-autoplay-attribute.html | 1 - ...edia-capabilities-decoding-info.https.html | 1 - ...edia-capabilities-encoding-info.https.html | 1 - .../resources/media-device-info.https.html | 1 - .../resources/media-devices-access.https.html | 1 - .../prerender/resources/media-play.html | 1 - .../prerender/resources/message-boxes.html | 1 - .../prerender/resources/midi.https.html | 1 - .../resources/navigator-plugins.html | 1 - .../notification-before-activation.html | 1 - .../prerender/resources/prerender-state.html | 1 - .../resources/prerendered-iframe.html | 1 - .../prerender/resources/prerendered-page.html | 1 - .../resources/presentation-request.html | 1 - .../resources/prompt-by-before-unload.html | 1 - .../prerender/resources/push.https.html | 1 - .../resources/register-service-worker.html | 1 - .../resources/request-picture-in-picture.html | 1 - .../prerender/resources/sandbox-iframe.html | 1 - .../resources/screen-capture.https.html | 1 - .../screen-orientation-lock.https.html | 1 - .../resources/service-worker-unregister.html | 1 - .../resources/service-worker-update.html | 1 - ...-storage-carry-over-to-prerender-page.html | 1 - ...n-storage-isolated-while-prerendering.html | 1 - ...ion-storage-no-leak-to-initiator-page.html | 1 - .../session-storage-swap-after-activate.html | 1 - .../resources/speech-synthesis.https.html | 1 - .../resources/storage-persist.https.html | 1 - .../prerender/resources/wake-lock.https.html | 1 - .../prerender/resources/web-hid.https.html | 1 - .../prerender/resources/web-locks.html | 1 - .../prerender/resources/web-nfc.https.html | 1 - .../prerender/resources/web-serial.https.html | 1 - .../prerender/resources/web-share.https.html | 1 - .../prerender/resources/web-usb.https.html | 1 - .../web-xr-immersive-vr-session.https.html | 1 - .../web-xr-inline-session.https.html | 1 - .../prerender/resources/window-move.html | 1 - .../window-open-during-prerendering.html | 1 - .../window-open-in-prerenderingchange.html | 1 - .../prerender/resources/window-resize.html | 1 - .../windowclient-navigate-on-iframe.html | 1 - tools/lint/lint.py | 12 +++---- tools/lint/rules.py | 5 +++ .../tests/dummy/{ => ref}/about_blank.html | 0 tools/lint/tests/test_lint.py | 2 +- .../resources/new-shared-worker-window.html | 1 - .../modules/resources/new-worker-window.html | 1 - worklets/resources/addmodule-window.html | 1 - worklets/resources/referrer-window.html | 1 - 143 files changed, 47 insertions(+), 143 deletions(-) rename tools/lint/tests/dummy/{ => ref}/about_blank.html (100%) diff --git a/appmanifest/protocol_handlers-member/resources/protocol_handlers_entry.html b/appmanifest/protocol_handlers-member/resources/protocol_handlers_entry.html index c5fa629f22bfdab..9477fa37dd7f993 100644 --- a/appmanifest/protocol_handlers-member/resources/protocol_handlers_entry.html +++ b/appmanifest/protocol_handlers-member/resources/protocol_handlers_entry.html @@ -4,7 +4,6 @@ Protocol Handling Web Platform Test - Pass - - - - - {{GET[policy]}} diff --git a/content-security-policy/navigation/support/test_csp_self_window.sub.html b/content-security-policy/navigation/support/test_csp_self_window.sub.html index 2f7b685a7516482..081fadef2a3c19a 100644 --- a/content-security-policy/navigation/support/test_csp_self_window.sub.html +++ b/content-security-policy/navigation/support/test_csp_self_window.sub.html @@ -1,6 +1,5 @@ - {{GET[window_url]}} diff --git a/cookies/partitioned-cookies/resources/partitioned-cookies-cross-site-embed.html b/cookies/partitioned-cookies/resources/partitioned-cookies-cross-site-embed.html index 05a99626dc4211c..2f9bb18779a064e 100644 --- a/cookies/partitioned-cookies/resources/partitioned-cookies-cross-site-embed.html +++ b/cookies/partitioned-cookies/resources/partitioned-cookies-cross-site-embed.html @@ -3,7 +3,6 @@ Test site embedded in a cross-site context - diff --git a/cookies/partitioned-cookies/resources/partitioned-cookies-top-level-redirect.html b/cookies/partitioned-cookies/resources/partitioned-cookies-top-level-redirect.html index c94beff5285578d..4de2862474e1c44 100644 --- a/cookies/partitioned-cookies/resources/partitioned-cookies-top-level-redirect.html +++ b/cookies/partitioned-cookies/resources/partitioned-cookies-top-level-redirect.html @@ -3,7 +3,6 @@ Test partitioned cookie top level cross-site - diff --git a/cookies/third-party-cookies/resources/third-party-cookies-cross-site-embed.html b/cookies/third-party-cookies/resources/third-party-cookies-cross-site-embed.html index 2d579c91bed92b6..54a7ba5cda2a931 100644 --- a/cookies/third-party-cookies/resources/third-party-cookies-cross-site-embed.html +++ b/cookies/third-party-cookies/resources/third-party-cookies-cross-site-embed.html @@ -3,7 +3,6 @@ Test site embedded in a cross-site context - diff --git a/fenced-frame/resources/automatic-beacon-unfenced-page.html b/fenced-frame/resources/automatic-beacon-unfenced-page.html index c9561bec5505916..098179eea1bcbfd 100644 --- a/fenced-frame/resources/automatic-beacon-unfenced-page.html +++ b/fenced-frame/resources/automatic-beacon-unfenced-page.html @@ -2,7 +2,6 @@ Page navigated to by an _unfencedTop navigation - diff --git a/fenced-frame/resources/background-fetch-inner.https.html b/fenced-frame/resources/background-fetch-inner.https.html index 1bca25a957a3fe4..de19d2bc36f1c82 100644 --- a/fenced-frame/resources/background-fetch-inner.https.html +++ b/fenced-frame/resources/background-fetch-inner.https.html @@ -1,6 +1,5 @@ - Fenced frame content to report the result of background fetch diff --git a/fenced-frame/resources/background-fetch-sw-inner.https.html b/fenced-frame/resources/background-fetch-sw-inner.https.html index 78e58e5bbf5e4f1..329a37cf802075f 100644 --- a/fenced-frame/resources/background-fetch-sw-inner.https.html +++ b/fenced-frame/resources/background-fetch-sw-inner.https.html @@ -1,6 +1,5 @@ - Fenced frame content to report the result of background fetch in SW diff --git a/fenced-frame/resources/background-sync-inner.https.html b/fenced-frame/resources/background-sync-inner.https.html index 81974c803ad19be..0ed60a5f20938d6 100644 --- a/fenced-frame/resources/background-sync-inner.https.html +++ b/fenced-frame/resources/background-sync-inner.https.html @@ -1,6 +1,5 @@ - Fenced frame content to report the result of background sync's register diff --git a/fenced-frame/resources/background-sync-sw-inner.https.html b/fenced-frame/resources/background-sync-sw-inner.https.html index b9521a4e20add8f..42f47e5d13f5929 100644 --- a/fenced-frame/resources/background-sync-sw-inner.https.html +++ b/fenced-frame/resources/background-sync-sw-inner.https.html @@ -1,6 +1,5 @@ - Fenced frame content to report the result of background sync's register in SW diff --git a/fenced-frame/resources/ignore-child-fenced-frame-onload-event-inner.html b/fenced-frame/resources/ignore-child-fenced-frame-onload-event-inner.html index 4fe496f29c84806..ea41d0df29c5f52 100644 --- a/fenced-frame/resources/ignore-child-fenced-frame-onload-event-inner.html +++ b/fenced-frame/resources/ignore-child-fenced-frame-onload-event-inner.html @@ -1,7 +1,6 @@ child frame with delayed onload event - diff --git a/fenced-frame/resources/navigate-ancestor-from-nested-fenced-frame.https.html b/fenced-frame/resources/navigate-ancestor-from-nested-fenced-frame.https.html index 74800b969f772c9..0f40ccf8c0b3fe8 100644 --- a/fenced-frame/resources/navigate-ancestor-from-nested-fenced-frame.https.html +++ b/fenced-frame/resources/navigate-ancestor-from-nested-fenced-frame.https.html @@ -1,7 +1,6 @@ Navigate ancestor helper - diff --git a/fenced-frame/resources/navigate-ancestor-from-nested-iframe.https.html b/fenced-frame/resources/navigate-ancestor-from-nested-iframe.https.html index 63a0cca8b4f2d2a..b6adfec4235a3b0 100644 --- a/fenced-frame/resources/navigate-ancestor-from-nested-iframe.https.html +++ b/fenced-frame/resources/navigate-ancestor-from-nested-iframe.https.html @@ -1,7 +1,6 @@ Navigate ancestor helper from nested fenced frame - diff --git a/fenced-frame/resources/navigate-ancestor-test-runner.https.html b/fenced-frame/resources/navigate-ancestor-test-runner.https.html index d0f2e8d694a6516..8033fea6ecc68f5 100644 --- a/fenced-frame/resources/navigate-ancestor-test-runner.https.html +++ b/fenced-frame/resources/navigate-ancestor-test-runner.https.html @@ -1,7 +1,6 @@ Test navigating an ancestor frame from within a fenced frame - diff --git a/fenced-frame/resources/permission-geolocation-test-runner.html b/fenced-frame/resources/permission-geolocation-test-runner.html index 724a35ce9a568b7..8a0a894d26738a0 100644 --- a/fenced-frame/resources/permission-geolocation-test-runner.html +++ b/fenced-frame/resources/permission-geolocation-test-runner.html @@ -1,7 +1,6 @@ Fenced frame content to report the result of navigator.geolocation.getCurrentPosition() - diff --git a/fenced-frame/resources/window-navigation-204-inner.html b/fenced-frame/resources/window-navigation-204-inner.html index e5e5adef1d6f2ba..a48746885086f2f 100644 --- a/fenced-frame/resources/window-navigation-204-inner.html +++ b/fenced-frame/resources/window-navigation-204-inner.html @@ -1,6 +1,5 @@ - Fenced frame content to report the value of window.navigation diff --git a/fetch/connection-pool/resources/network-partition-about-blank-checker.html b/fetch/connection-pool/resources/network-partition-about-blank-checker.html index 7a8b61323752d2b..1bcf589e74037a0 100644 --- a/fetch/connection-pool/resources/network-partition-about-blank-checker.html +++ b/fetch/connection-pool/resources/network-partition-about-blank-checker.html @@ -4,7 +4,6 @@ about:blank Network Partition Checker - diff --git a/fetch/connection-pool/resources/network-partition-iframe-checker.html b/fetch/connection-pool/resources/network-partition-iframe-checker.html index f76ed1844719c9f..34f63369b0fc9e0 100644 --- a/fetch/connection-pool/resources/network-partition-iframe-checker.html +++ b/fetch/connection-pool/resources/network-partition-iframe-checker.html @@ -4,7 +4,6 @@ Iframe Network Partition Checker - diff --git a/fetch/connection-pool/resources/network-partition-worker-checker.html b/fetch/connection-pool/resources/network-partition-worker-checker.html index e6b7ea7673fe798..c3f8970c9d1d791 100644 --- a/fetch/connection-pool/resources/network-partition-worker-checker.html +++ b/fetch/connection-pool/resources/network-partition-worker-checker.html @@ -4,7 +4,6 @@ Worker Network Partition Checker - diff --git a/fetch/http-cache/resources/split-cache-popup-with-iframe.html b/fetch/http-cache/resources/split-cache-popup-with-iframe.html index 48b16180cfdfa5c..786647c0ff2f132 100644 --- a/fetch/http-cache/resources/split-cache-popup-with-iframe.html +++ b/fetch/http-cache/resources/split-cache-popup-with-iframe.html @@ -4,7 +4,6 @@ HTTP Cache - helper - diff --git a/fetch/http-cache/resources/split-cache-popup.html b/fetch/http-cache/resources/split-cache-popup.html index edb579479414fe9..623fb48784b016c 100644 --- a/fetch/http-cache/resources/split-cache-popup.html +++ b/fetch/http-cache/resources/split-cache-popup.html @@ -4,7 +4,6 @@ HTTP Cache - helper - diff --git a/focus/support/focus-event-after-switching-iframes-inner.html b/focus/support/focus-event-after-switching-iframes-inner.html index 33b26c15822b6be..3a10b140980cf1b 100644 --- a/focus/support/focus-event-after-switching-iframes-inner.html +++ b/focus/support/focus-event-after-switching-iframes-inner.html @@ -5,6 +5,7 @@ Focus event inner document +

Inner

diff --git a/html/browsers/browsing-the-web/history-traversal/pagereveal/resources/order-in-prerender-activation-popup.html b/html/browsers/browsing-the-web/history-traversal/pagereveal/resources/order-in-prerender-activation-popup.html index 78989adc172997d..e42f113609aff32 100644 --- a/html/browsers/browsing-the-web/history-traversal/pagereveal/resources/order-in-prerender-activation-popup.html +++ b/html/browsers/browsing-the-web/history-traversal/pagereveal/resources/order-in-prerender-activation-popup.html @@ -2,7 +2,6 @@ pagereveal event fires and in correct order on prerender activation (popup) - -