From 26a029d407be480d791972afb5975cf62c9360a6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 02:47:55 +0200 Subject: Adding upstream version 124.0.1. Signed-off-by: Daniel Baumann --- testing/web-platform/tests/fenced-frame/README.md | 225 +++++++ .../add-fencedframe-to-detached-iframe.https.html | 36 ++ .../fenced-frame/ancestor-throttle.https.html | 87 +++ .../tests/fenced-frame/anchor-focus.https.html | 47 ++ .../tests/fenced-frame/autofocus-denied.https.html | 25 + ...utomatic-beacon-anchor-click-handler.https.html | 63 ++ .../automatic-beacon-click-handler.https.html | 61 ++ .../automatic-beacon-component-ad.https.html | 56 ++ .../automatic-beacon-cross-origin-false.https.html | 42 ++ ...matic-beacon-cross-origin-navigation.https.html | 42 ++ ...utomatic-beacon-cross-origin-no-data.https.html | 47 ++ ...omatic-beacon-cross-origin-no-opt-in.https.html | 45 ++ .../automatic-beacon-no-destination.https.html | 44 ++ .../automatic-beacon-no-opt-in.https.html | 48 ++ .../automatic-beacon-shared-storage.https.html | 45 ++ .../automatic-beacon-two-events-clear.https.html | 52 ++ .../automatic-beacon-two-events-persist.https.html | 48 ++ .../automatic-beacon-unfenced-top.https.html | 55 ++ .../automatic-beacon-use-ancestor-data.https.html | 62 ++ .../tests/fenced-frame/background-fetch.https.html | 128 ++++ .../tests/fenced-frame/background-sync.https.html | 218 +++++++ .../tests/fenced-frame/badging.https.html | 79 +++ .../tests/fenced-frame/battery_status.https.html | 19 + .../tests/fenced-frame/before-unload.https.html | 25 + .../tests/fenced-frame/can-load-api.https.html | 68 +++ ...allation-does-not-trigger-navigation.https.html | 52 ++ .../fenced-frame/client-hints-meta.https.html | 40 ++ .../tests/fenced-frame/client-hints.https.html | 36 ++ .../fenced-frame/client-hints.https.html.headers | 3 + .../tests/fenced-frame/compute-pressure.https.html | 34 ++ .../config-cross-origin-apis.https.html | 44 ++ ...navigation-of-navigated-fenced-frame.https.html | 38 ++ ...fig-installation-triggers-navigation.https.html | 34 ++ ...ation-unloads-navigated-fenced-frame.https.html | 44 ++ .../consume-user-activation.https.html | 95 +++ .../tests/fenced-frame/content-index.https.html | 150 +++++ .../tests/fenced-frame/coop-bcg-swap.https.html | 40 ++ .../fenced-frame/create-credential.https.html | 25 + ...in-sandbox-and-adopt-outside-sandbox.https.html | 35 ++ .../tests/fenced-frame/csp-allowed.https.html | 40 ++ .../tests/fenced-frame/csp-blocked.https.html | 65 +++ .../csp-fenced-frame-src-allowed.https.html | 22 + .../csp-fenced-frame-src-blocked.https.html | 37 ++ .../fenced-frame/csp-frame-src-allowed.https.html | 22 + .../fenced-frame/csp-frame-src-blocked.https.html | 36 ++ .../fenced-frame/csp-transparent-url.https.html | 53 ++ .../web-platform/tests/fenced-frame/csp.https.html | 39 ++ .../tests/fenced-frame/cspee.https.html | 74 +++ .../tests/fenced-frame/deep-copy-config.https.html | 108 ++++ .../default-enabled-features-allow-all.https.html | 74 +++ ...t-enabled-features-allow-all.https.html.headers | 1 + .../default-enabled-features-allow-none.https.html | 46 ++ ...-enabled-features-allow-none.https.html.headers | 1 + .../default-enabled-features-allow-self.https.html | 67 +++ ...-enabled-features-allow-self.https.html.headers | 1 + ...t-enabled-features-allow-unspecified.https.html | 59 ++ ...ult-enabled-features-attribute-allow.https.html | 72 +++ ...lt-enabled-features-attribute-change.https.html | 50 ++ ...-enabled-features-attribute-disallow.https.html | 33 ++ ...nabled-features-attribution-disabled.https.html | 28 + ...eatures-attribution-disabled.https.html.headers | 1 + .../default-enabled-features-subframe.https.html | 43 ++ .../default-enabled-features-unset.https.html | 29 + ...fault-enabled-features-unset.https.html.headers | 1 + .../fenced-frame/deprecated-config-apis.https.html | 42 ++ .../disable-untrusted-network.https.html | 49 ++ .../disallowed-navigation-to-blob.https.html | 37 ++ .../disallowed-navigation-to-data.https.html | 35 ++ .../disallowed-navigation-to-http.https.html | 40 ++ ...owed-navigations-dangling-markup-urn.https.html | 64 ++ ...sallowed-navigations-dangling-markup.https.html | 32 + .../fenced-frame/disallowed-navigations.https.html | 118 ++++ .../fenced-frame/document-activeelement.https.html | 40 ++ .../fenced-frame/document-hasfocus.https.html | 37 ++ .../document-picture-in-picture-denied.https.html | 28 + .../fenced-frame/document-referrer.https.html | 60 ++ .../tests/fenced-frame/download.https.html | 39 ++ .../embedder-coop-coep-blocked.https.html | 21 + .../embedder-coop-coep-blocked.https.html.headers | 2 + .../embedder-csp-not-propagate.https.html | 24 + .../tests/fenced-frame/embedder-no-coep.https.html | 27 + .../fenced-frame/embedder-require-corp.https.html | 39 ++ .../embedder-require-corp.https.html.headers | 1 + .../fenced-frame/fedcm-get-credential.https.html | 25 + .../tests/fenced-frame/fence-api.https.html | 29 + .../fence-report-event-destination-url.https.html | 42 ++ .../fenced-frame/fence-report-event.https.html | 28 + .../fenced-frame/fence-urn-iframes.https.html | 52 ++ ...dge-container-size-mutation-observer.https.html | 48 ++ .../fenced-frame/fledge-container-size.https.html | 102 ++++ .../fenced-frame/fragment-navigation.https.html | 50 ++ .../tests/fenced-frame/frame-navigation.https.html | 86 +++ .../tests/fenced-frame/gamepad.https.html | 20 + .../get-mode-in-nested-frame.https.html | 33 ++ .../fenced-frame/get-nested-configs.https.html | 124 ++++ .../tests/fenced-frame/header-referrer.https.html | 55 ++ .../fenced-frame/header-secFetchDest.https.html | 38 ++ .../web-platform/tests/fenced-frame/hid.https.html | 37 ++ ...rward-should-not-work-in-fenced-tree.https.html | 68 +++ ...s-replace-do-not-contribute-to-joint.https.html | 55 ++ ...e-navigation-not-reflected-in-fenced.https.html | 78 +++ ...nore-child-fenced-frame-onload-event.https.html | 31 + .../tests/fenced-frame/insecure-context.html | 33 ++ .../fenced-frame/intersection-observer.https.html | 53 ++ .../tests/fenced-frame/invalid-url.https.html | 17 + .../tests/fenced-frame/key-scrolling.https.html | 67 +++ .../tests/fenced-frame/key-value-store.https.html | 43 ++ .../fenced-frame/load-ad-with-size.https.html | 29 + .../tests/fenced-frame/loading.https.html | 26 + .../location-ancestorOrigins.https.html | 51 ++ .../mediaDevices-setCaptureHandle.https.html | 32 + .../fenced-frame/multiple-component-ads.https.html | 32 + .../navigate-ancestor-by-name.https.html | 67 +++ ...avigate-ancestor-nested-fenced-frame.https.html | 20 + .../navigate-ancestor-nested-iframe.https.html | 20 + ...gate-ancestor-top-level-fenced-frame.https.html | 20 + .../navigate-by-name-succeed.https.html | 37 ++ .../navigate-descendant-by-name.https.html | 90 +++ .../navigate-related-page-by-name.https.html | 60 ++ .../navigator-keyboard-layout-map.https.html | 39 ++ .../navigator-keyboard-lock.https.html | 25 + .../tests/fenced-frame/navigator-subapp.https.html | 30 + .../fenced-frame/navigator-vibrate.https.html | 60 ++ .../navigator-virtualkeyboard.https.html | 23 + .../fenced-frame/nested-opaque-ad-sizes.https.html | 44 ++ .../tests/fenced-frame/notification.https.html | 103 ++++ .../opaque-ad-sizes-exact-size.https.html | 27 + .../opaque-ad-sizes-special-cases.https.html | 27 + .../tests/fenced-frame/payment-handler.https.html | 60 ++ .../tests/fenced-frame/payment-request.https.html | 37 ++ .../permission-api-denied-non-standard.https.html | 40 ++ .../fenced-frame/permission-api-denied.https.html | 46 ++ .../fenced-frame/permission-geolocation.https.html | 74 +++ .../permission-notification.https.html | 28 + .../fenced-frame/picture-in-picture.https.html | 31 + .../tests/fenced-frame/popup-noopener.https.html | 57 ++ .../tests/fenced-frame/prerender.https.html | 51 ++ .../fenced-frame/presentation-receiver.https.html | 26 + .../tests/fenced-frame/reinsert.https.html | 32 + .../report-event-inactive-document.https.html | 48 ++ .../report-event-reserved-event.https.html | 40 ++ .../report-event-sandboxed-iframe.https.html | 34 ++ .../fenced-frame/resize-lock-input.https.html | 112 ++++ .../tests/fenced-frame/resize-lock-zoom.https.html | 39 ++ .../tests/fenced-frame/resize-lock.https.html | 96 +++ .../resolve-to-config-promise.https.html | 80 +++ .../ancestor-throttle-iframe-csp.https.html | 18 + ...ancestor-throttle-iframe-csp.https.html.headers | 2 + .../ancestor-throttle-iframe-xfo.https.html | 18 + ...ancestor-throttle-iframe-xfo.https.html.headers | 2 + .../resources/ancestor-throttle-inner.https.html | 33 ++ .../ancestor-throttle-inner.https.html.headers | 1 + .../resources/ancestor-throttle-nested.https.html | 22 + .../ancestor-throttle-nested.https.html.headers | 1 + .../resources/automatic-beacon-helper.js | 104 ++++ .../resources/automatic-beacon-store.py | 44 ++ .../resources/automatic-beacon-unfenced-page.html | 21 + .../resources/background-fetch-inner.https.html | 47 ++ .../background-fetch-inner.https.html.headers | 1 + .../resources/background-fetch-sw-inner.https.html | 38 ++ .../background-fetch-sw-inner.https.html.headers | 1 + .../fenced-frame/resources/background-fetch-sw.js | 36 ++ .../resources/background-sync-helper.js | 23 + .../resources/background-sync-inner.https.html | 32 + .../background-sync-inner.https.html.headers | 1 + .../resources/background-sync-sw-inner.https.html | 41 ++ .../background-sync-sw-inner.https.html.headers | 1 + .../fenced-frame/resources/background-sync-sw.js | 21 + .../tests/fenced-frame/resources/badging-sw.js | 23 + .../resources/before-unload-inner.html | 27 + .../resources/before-unload-inner.html.headers | 1 + .../resources/check-header-referrer.py | 16 + .../resources/check-header-sec-fetch-dest.py | 14 + .../client-hints-iframe-inner.sub.https.html | 11 + ...lient-hints-iframe-inner.sub.https.html.headers | 4 + .../resources/client-hints-inner.sub.https.html | 27 + .../client-hints-inner.sub.https.html.headers | 5 + .../client-hints-meta-iframe-inner.sub.https.html | 15 + ...-hints-meta-iframe-inner.sub.https.html.headers | 2 + .../client-hints-meta-inner.sub.https.html | 31 + .../client-hints-meta-inner.sub.https.html.headers | 2 + .../tests/fenced-frame/resources/close.html | 5 + .../config-cross-origin-apis-inner.https.html | 37 ++ ...nfig-cross-origin-apis-inner.https.html.headers | 1 + .../config-cross-origin-iframe.https.html | 30 + .../config-cross-origin-iframe.https.html.headers | 1 + .../config-embed-cross-origin-iframe.https.html | 18 + ...ig-embed-cross-origin-iframe.https.html.headers | 1 + .../fenced-frame/resources/content-index-sw.js | 28 + .../resources/cookie-access.https.html | 11 + .../resources/cookie-access.https.html.headers | 1 + .../resources/create-credential-inner.https.html | 38 ++ .../create-credential-inner.https.html.headers | 1 + .../tests/fenced-frame/resources/create-popup.html | 18 + .../resources/create-popup.html.headers | 1 + .../csp-fenced-frame-src-allowed-inner.html | 7 + ...csp-fenced-frame-src-allowed-inner.html.headers | 1 + .../csp-fenced-frame-src-blocked-inner.html | 10 + ...csp-fenced-frame-src-blocked-inner.html.headers | 1 + .../resources/csp-frame-src-allowed-inner.html | 7 + .../csp-frame-src-allowed-inner.html.headers | 1 + .../resources/csp-frame-src-blocked-inner.html | 9 + .../csp-frame-src-blocked-inner.html.headers | 1 + .../tests/fenced-frame/resources/csp-inner.html | 37 ++ .../fenced-frame/resources/csp-inner.html.headers | 2 + .../tests/fenced-frame/resources/csp.png | Bin 0 -> 4476 bytes .../resources/dangling-markup-helper.js | 15 + .../resources/default-enabled-features-helper.js | 53 ++ .../default-enabled-features-navigate.https.html | 25 + ...lt-enabled-features-navigate.https.html.headers | 1 + ...nabled-features-subframe-fencedframe.https.html | 21 + ...eatures-subframe-fencedframe.https.html.headers | 2 + ...ult-enabled-features-subframe-iframe.https.html | 19 + ...led-features-subframe-iframe.https.html.headers | 1 + .../fenced-frame/resources/download-helper.js | 29 + .../fenced-frame/resources/download-inner.html | 34 ++ .../resources/download-inner.html.headers | 1 + .../tests/fenced-frame/resources/download-stash.py | 28 + .../tests/fenced-frame/resources/dummy.html | 2 + .../tests/fenced-frame/resources/embeddee.html | 7 + .../fenced-frame/resources/embeddee.html.headers | 1 + .../fenced-frame/resources/embedder-policy.js | 39 ++ .../tests/fenced-frame/resources/empty-worker.js | 1 + .../fedcm-get-credential-inner.https.html | 45 ++ .../fedcm-get-credential-inner.https.html.headers | 1 + .../resources/fence-api-inner.https.html | 22 + .../resources/fence-api-inner.https.html.headers | 1 + .../resources/fenced-frame-loaded.html | 13 + .../resources/fenced-frame-loaded.html.headers | 1 + ...t-ready-for-outermost-document-to-navigate.html | 16 + ...for-outermost-document-to-navigate.html.headers | 1 + .../fenced-frame/resources/fledge-bidding-logic.py | 116 ++++ .../resources/fledge-decision-logic.py | 66 +++ ...frame-navigation-inner-create-nested.https.html | 48 ++ ...vigation-inner-create-nested.https.html.headers | 1 + .../frame-navigation-inner-simple.https.html | 13 + ...rame-navigation-inner-simple.https.html.headers | 1 + .../frame-with-intersection-observer.html | 29 + .../frame-with-intersection-observer.html.headers | 1 + .../fenced-frame/resources/gamepad-inner.html | 13 + .../resources/gamepad-inner.html.headers | 1 + .../resources/get-nested-configs-inner.html | 10 + .../get-nested-configs-inner.html.headers | 1 + .../get-nested-configs-nested-iframe.html | 10 + .../get-nested-configs-nested-iframe.html.headers | 1 + .../tests/fenced-frame/resources/get_battery.html | 17 + .../resources/get_battery.html.headers | 1 + .../resources/header-referrer-inner.html | 40 ++ .../resources/header-referrer-inner.html.headers | 1 + .../resources/header-secFetchDest-inner.html | 26 + .../header-secFetchDest-inner.html.headers | 1 + ...rward-should-not-work-in-fenced-tree-inner.html | 45 ++ ...ould-not-work-in-fenced-tree-inner.html.headers | 1 + ...s-replace-do-not-contribute-to-joint-inner.html | 115 ++++ ...e-do-not-contribute-to-joint-inner.html.headers | 1 + ...e-navigation-not-reflected-in-fenced-inner.html | 72 +++ ...tion-not-reflected-in-fenced-inner.html.headers | 1 + ...nore-child-fenced-frame-onload-event-inner.html | 41 ++ ...ld-fenced-frame-onload-event-inner.html.headers | 1 + .../fenced-frame/resources/key-value-store.py | 46 ++ .../location-ancestorOrigins-inner.https.html | 53 ++ ...cation-ancestorOrigins-inner.https.html.headers | 1 + .../navigate-ancestor-destination.https.html | 17 + ...avigate-ancestor-destination.https.html.headers | 1 + ...te-ancestor-from-nested-fenced-frame.https.html | 39 ++ ...tor-from-nested-fenced-frame.https.html.headers | 1 + ...navigate-ancestor-from-nested-iframe.https.html | 38 ++ ...-ancestor-from-nested-iframe.https.html.headers | 1 + .../resources/navigate-ancestor-helper.https.html | 33 ++ .../navigate-ancestor-helper.https.html.headers | 1 + .../resources/navigate-ancestor-helper.js | 28 + .../navigate-ancestor-test-runner.https.html | 76 +++ .../resources/navigate-by-name-inner.html | 45 ++ .../resources/navigate-by-name-inner.html.headers | 1 + .../navigate-by-name-reporting-helper.html | 34 ++ .../navigate-by-name-reporting-helper.html.headers | 1 + .../resources/navigate-nested-config.html | 14 + .../resources/navigate-nested-config.html.headers | 1 + .../navigator-keyboard-layout-map-inner.html | 21 + ...avigator-keyboard-layout-map-inner.html.headers | 1 + .../resources/navigator-keyboard-lock-inner.html | 21 + .../navigator-keyboard-lock-inner.html.headers | 1 + .../fenced-frame/resources/notification-sw.js | 20 + .../resources/opaque-ad-sizes-utils.js | 47 ++ .../fenced-frame/resources/payment-handler-sw.js | 10 + .../resources/permission-api-denied-inner.html | 15 + .../permission-api-denied-inner.html.headers | 1 + .../resources/permission-geolocation-inner.html | 16 + .../permission-geolocation-inner.html.headers | 1 + .../permission-geolocation-test-runner.html | 24 + .../resources/permission-notification-inner.html | 13 + .../permission-notification-inner.html.headers | 1 + .../resources/popup-noopener-destination.html | 20 + .../resources/popup-noopener-inner.html | 48 ++ .../resources/popup-noopener-inner.html.headers | 1 + .../fenced-frame/resources/postmessage-config.html | 14 + .../fenced-frame/resources/prerender-inner.html | 20 + .../resources/prerender-inner.html.headers | 1 + .../resources/presentation-receiver-inner.html | 17 + .../presentation-receiver-inner.html.headers | 1 + .../resources/remote-context-executor.https.html | 29 + .../tests/fenced-frame/resources/report-url.html | 7 + .../fenced-frame/resources/report-url.html.headers | 1 + .../fenced-frame/resources/resize-lock-inner.html | 23 + .../resources/resize-lock-inner.html.headers | 1 + .../tests/fenced-frame/resources/response-204.py | 4 + .../sandbox-mandatory-flags-iframe.sub.html | 13 + .../sandbox-mandatory-flags-inner.sub.html | 6 + .../sandbox-mandatory-flags-inner.sub.html.headers | 1 + ...box-mandatory-flags-looser-restriction.sub.html | 14 + .../resources/sandboxed-features-inner.sub.html | 20 + .../sandboxed-features-inner.sub.html.headers | 1 + .../sandboxed-features-looser-restriction.sub.html | 19 + ...ed-features-looser-restriction.sub.html.headers | 1 + .../fenced-frame/resources/sandboxed-features.js | 126 ++++ .../serviceWorker-dedicated-worker-inner.html | 28 + ...rviceWorker-dedicated-worker-inner.html.headers | 1 + .../resources/serviceWorker-dedicated-worker-sw.js | 18 + .../serviceWorker-dedicated-worker-sw.js.headers | 1 + .../resources/serviceWorker-dedicated-worker.js | 8 + .../resources/serviceWorker-frameType-inner.html | 37 ++ .../serviceWorker-frameType-inner.html.headers | 1 + .../resources/serviceWorker-frameType-nested.html | 25 + .../serviceWorker-frameType-nested.html.headers | 1 + .../resources/serviceWorker-frameType.js | 19 + .../serviceWorker-navigate-inner-success.html | 11 + ...rviceWorker-navigate-inner-success.html.headers | 1 + .../resources/serviceWorker-navigate-inner.html | 16 + .../serviceWorker-navigate-inner.html.headers | 1 + .../resources/serviceWorker-navigate.js | 18 + .../resources/serviceWorker-push-sw.js | 19 + .../unique-cookie-partition-inner.https.html | 42 ++ ...nique-cookie-partition-inner.https.html.headers | 2 + .../fenced-frame/resources/unreached.https.html | 15 + .../tests/fenced-frame/resources/utils.js | 648 +++++++++++++++++++++ .../resources/web-bluetooth-inner.html | 33 ++ .../resources/web-bluetooth-inner.html.headers | 1 + .../resources/web-nfc-inner.https.html | 23 + .../resources/web-nfc-inner.https.html.headers | 1 + .../fenced-frame/resources/web-share-inner.html | 21 + .../resources/web-share-inner.html.headers | 1 + .../resources/window-frameElement-inner.html | 14 + .../window-frameElement-inner.html.headers | 1 + .../resources/window-navigation-204-inner.html | 23 + .../window-navigation-204-inner.html.headers | 1 + .../resources/window-outer-dimensions-inner.html | 36 ++ .../window-outer-dimensions-inner.html.headers | 1 + .../resources/window-parent-inner.html | 64 ++ .../resources/window-parent-inner.html.headers | 1 + .../fenced-frame/resources/window-top-inner.html | 63 ++ .../resources/window-top-inner.html.headers | 1 + ...ed-fenced-frame-in-iframe-navigation.https.html | 75 +++ ...evoke-nested-fenced-frame-navigation.https.html | 50 ++ .../revoke-unfenced-top-navigation.https.html | 47 ++ .../fenced-frame/sandbox-attribute.https.html | 63 ++ .../sandbox-mandatory-flags.https.html | 136 +++++ .../sandboxed-features-alert.https.html | 14 + .../sandboxed-features-confirm.https.html | 15 + .../sandboxed-features-documentdomain.https.html | 14 + .../sandboxed-features-pointerlock.https.html | 14 + ...dboxed-features-presentation-request.https.html | 14 + .../sandboxed-features-printdialog.https.html | 14 + .../sandboxed-features-prompt.https.html | 14 + ...xed-features-screen-orientation-lock.https.html | 14 + .../tests/fenced-frame/script-focus.https.html | 206 +++++++ .../tests/fenced-frame/scroll-into-view.https.html | 44 ++ .../selecturl-flexible-size.https.html | 56 ++ .../fenced-frame/self-urn-navigation.https.html | 37 ++ .../serviceWorker-dedicated-worker.https.html | 71 +++ .../serviceWorker-frameType.https.html | 33 ++ .../fenced-frame/serviceWorker-push.https.html | 62 ++ .../fenced-frame/set-automatic-beacon.https.html | 54 ++ ...null-config-navigates-to-about-blank.https.html | 44 ++ .../fenced-frame/show-directory-picker.https.html | 31 + .../fenced-frame/show-open-file-picker.https.html | 32 + .../fenced-frame/storage-partitioning.https.html | 188 ++++++ .../tests/fenced-frame/subframe-loading.https.html | 30 + .../unique-cookie-partition.https.html | 55 ++ .../tests/fenced-frame/user-activation.https.html | 95 +++ .../tests/fenced-frame/visual-viewport.https.html | 82 +++ .../tests/fenced-frame/web-bluetooth.https.html | 26 + .../tests/fenced-frame/web-nfc.https.html | 28 + .../tests/fenced-frame/web-share.https.html | 26 + .../tests/fenced-frame/web-usb.https.html | 29 + .../tests/fenced-frame/window-close.https.html | 21 + .../fenced-frame/window-frameElement.https.html | 21 + .../fenced-frame/window-navigation-204.https.html | 24 + .../window-outer-dimensions.https.html | 53 ++ .../tests/fenced-frame/window-parent.https.html | 44 ++ .../tests/fenced-frame/window-top.https.html | 44 ++ 390 files changed, 13215 insertions(+) create mode 100644 testing/web-platform/tests/fenced-frame/README.md create mode 100644 testing/web-platform/tests/fenced-frame/add-fencedframe-to-detached-iframe.https.html create mode 100644 testing/web-platform/tests/fenced-frame/ancestor-throttle.https.html create mode 100644 testing/web-platform/tests/fenced-frame/anchor-focus.https.html create mode 100644 testing/web-platform/tests/fenced-frame/autofocus-denied.https.html create mode 100644 testing/web-platform/tests/fenced-frame/automatic-beacon-anchor-click-handler.https.html create mode 100644 testing/web-platform/tests/fenced-frame/automatic-beacon-click-handler.https.html create mode 100644 testing/web-platform/tests/fenced-frame/automatic-beacon-component-ad.https.html create mode 100644 testing/web-platform/tests/fenced-frame/automatic-beacon-cross-origin-false.https.html create mode 100644 testing/web-platform/tests/fenced-frame/automatic-beacon-cross-origin-navigation.https.html create mode 100644 testing/web-platform/tests/fenced-frame/automatic-beacon-cross-origin-no-data.https.html create mode 100644 testing/web-platform/tests/fenced-frame/automatic-beacon-cross-origin-no-opt-in.https.html create mode 100644 testing/web-platform/tests/fenced-frame/automatic-beacon-no-destination.https.html create mode 100644 testing/web-platform/tests/fenced-frame/automatic-beacon-no-opt-in.https.html create mode 100644 testing/web-platform/tests/fenced-frame/automatic-beacon-shared-storage.https.html create mode 100644 testing/web-platform/tests/fenced-frame/automatic-beacon-two-events-clear.https.html create mode 100644 testing/web-platform/tests/fenced-frame/automatic-beacon-two-events-persist.https.html create mode 100644 testing/web-platform/tests/fenced-frame/automatic-beacon-unfenced-top.https.html create mode 100644 testing/web-platform/tests/fenced-frame/automatic-beacon-use-ancestor-data.https.html create mode 100644 testing/web-platform/tests/fenced-frame/background-fetch.https.html create mode 100644 testing/web-platform/tests/fenced-frame/background-sync.https.html create mode 100644 testing/web-platform/tests/fenced-frame/badging.https.html create mode 100644 testing/web-platform/tests/fenced-frame/battery_status.https.html create mode 100644 testing/web-platform/tests/fenced-frame/before-unload.https.html create mode 100644 testing/web-platform/tests/fenced-frame/can-load-api.https.html create mode 100644 testing/web-platform/tests/fenced-frame/change-src-attribute-after-config-installation-does-not-trigger-navigation.https.html create mode 100644 testing/web-platform/tests/fenced-frame/client-hints-meta.https.html create mode 100644 testing/web-platform/tests/fenced-frame/client-hints.https.html create mode 100644 testing/web-platform/tests/fenced-frame/client-hints.https.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/compute-pressure.https.html create mode 100644 testing/web-platform/tests/fenced-frame/config-cross-origin-apis.https.html create mode 100644 testing/web-platform/tests/fenced-frame/config-installation-triggers-navigation-of-navigated-fenced-frame.https.html create mode 100644 testing/web-platform/tests/fenced-frame/config-installation-triggers-navigation.https.html create mode 100644 testing/web-platform/tests/fenced-frame/config-with-empty-url-installation-unloads-navigated-fenced-frame.https.html create mode 100644 testing/web-platform/tests/fenced-frame/consume-user-activation.https.html create mode 100644 testing/web-platform/tests/fenced-frame/content-index.https.html create mode 100644 testing/web-platform/tests/fenced-frame/coop-bcg-swap.https.html create mode 100644 testing/web-platform/tests/fenced-frame/create-credential.https.html create mode 100644 testing/web-platform/tests/fenced-frame/create-in-sandbox-and-adopt-outside-sandbox.https.html create mode 100644 testing/web-platform/tests/fenced-frame/csp-allowed.https.html create mode 100644 testing/web-platform/tests/fenced-frame/csp-blocked.https.html create mode 100644 testing/web-platform/tests/fenced-frame/csp-fenced-frame-src-allowed.https.html create mode 100644 testing/web-platform/tests/fenced-frame/csp-fenced-frame-src-blocked.https.html create mode 100644 testing/web-platform/tests/fenced-frame/csp-frame-src-allowed.https.html create mode 100644 testing/web-platform/tests/fenced-frame/csp-frame-src-blocked.https.html create mode 100644 testing/web-platform/tests/fenced-frame/csp-transparent-url.https.html create mode 100644 testing/web-platform/tests/fenced-frame/csp.https.html create mode 100644 testing/web-platform/tests/fenced-frame/cspee.https.html create mode 100644 testing/web-platform/tests/fenced-frame/deep-copy-config.https.html create mode 100644 testing/web-platform/tests/fenced-frame/default-enabled-features-allow-all.https.html create mode 100644 testing/web-platform/tests/fenced-frame/default-enabled-features-allow-all.https.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/default-enabled-features-allow-none.https.html create mode 100644 testing/web-platform/tests/fenced-frame/default-enabled-features-allow-none.https.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/default-enabled-features-allow-self.https.html create mode 100644 testing/web-platform/tests/fenced-frame/default-enabled-features-allow-self.https.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/default-enabled-features-allow-unspecified.https.html create mode 100644 testing/web-platform/tests/fenced-frame/default-enabled-features-attribute-allow.https.html create mode 100644 testing/web-platform/tests/fenced-frame/default-enabled-features-attribute-change.https.html create mode 100644 testing/web-platform/tests/fenced-frame/default-enabled-features-attribute-disallow.https.html create mode 100644 testing/web-platform/tests/fenced-frame/default-enabled-features-attribution-disabled.https.html create mode 100644 testing/web-platform/tests/fenced-frame/default-enabled-features-attribution-disabled.https.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/default-enabled-features-subframe.https.html create mode 100644 testing/web-platform/tests/fenced-frame/default-enabled-features-unset.https.html create mode 100644 testing/web-platform/tests/fenced-frame/default-enabled-features-unset.https.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/deprecated-config-apis.https.html create mode 100644 testing/web-platform/tests/fenced-frame/disable-untrusted-network.https.html create mode 100644 testing/web-platform/tests/fenced-frame/disallowed-navigation-to-blob.https.html create mode 100644 testing/web-platform/tests/fenced-frame/disallowed-navigation-to-data.https.html create mode 100644 testing/web-platform/tests/fenced-frame/disallowed-navigation-to-http.https.html create mode 100644 testing/web-platform/tests/fenced-frame/disallowed-navigations-dangling-markup-urn.https.html create mode 100644 testing/web-platform/tests/fenced-frame/disallowed-navigations-dangling-markup.https.html create mode 100644 testing/web-platform/tests/fenced-frame/disallowed-navigations.https.html create mode 100644 testing/web-platform/tests/fenced-frame/document-activeelement.https.html create mode 100644 testing/web-platform/tests/fenced-frame/document-hasfocus.https.html create mode 100644 testing/web-platform/tests/fenced-frame/document-picture-in-picture-denied.https.html create mode 100644 testing/web-platform/tests/fenced-frame/document-referrer.https.html create mode 100644 testing/web-platform/tests/fenced-frame/download.https.html create mode 100644 testing/web-platform/tests/fenced-frame/embedder-coop-coep-blocked.https.html create mode 100644 testing/web-platform/tests/fenced-frame/embedder-coop-coep-blocked.https.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/embedder-csp-not-propagate.https.html create mode 100644 testing/web-platform/tests/fenced-frame/embedder-no-coep.https.html create mode 100644 testing/web-platform/tests/fenced-frame/embedder-require-corp.https.html create mode 100644 testing/web-platform/tests/fenced-frame/embedder-require-corp.https.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/fedcm-get-credential.https.html create mode 100644 testing/web-platform/tests/fenced-frame/fence-api.https.html create mode 100644 testing/web-platform/tests/fenced-frame/fence-report-event-destination-url.https.html create mode 100644 testing/web-platform/tests/fenced-frame/fence-report-event.https.html create mode 100644 testing/web-platform/tests/fenced-frame/fence-urn-iframes.https.html create mode 100644 testing/web-platform/tests/fenced-frame/fledge-container-size-mutation-observer.https.html create mode 100644 testing/web-platform/tests/fenced-frame/fledge-container-size.https.html create mode 100644 testing/web-platform/tests/fenced-frame/fragment-navigation.https.html create mode 100644 testing/web-platform/tests/fenced-frame/frame-navigation.https.html create mode 100644 testing/web-platform/tests/fenced-frame/gamepad.https.html create mode 100644 testing/web-platform/tests/fenced-frame/get-mode-in-nested-frame.https.html create mode 100644 testing/web-platform/tests/fenced-frame/get-nested-configs.https.html create mode 100644 testing/web-platform/tests/fenced-frame/header-referrer.https.html create mode 100644 testing/web-platform/tests/fenced-frame/header-secFetchDest.https.html create mode 100644 testing/web-platform/tests/fenced-frame/hid.https.html create mode 100644 testing/web-platform/tests/fenced-frame/history-back-and-forward-should-not-work-in-fenced-tree.https.html create mode 100644 testing/web-platform/tests/fenced-frame/history-length-fenced-navigations-replace-do-not-contribute-to-joint.https.html create mode 100644 testing/web-platform/tests/fenced-frame/history-length-outer-page-navigation-not-reflected-in-fenced.https.html create mode 100644 testing/web-platform/tests/fenced-frame/ignore-child-fenced-frame-onload-event.https.html create mode 100644 testing/web-platform/tests/fenced-frame/insecure-context.html create mode 100644 testing/web-platform/tests/fenced-frame/intersection-observer.https.html create mode 100644 testing/web-platform/tests/fenced-frame/invalid-url.https.html create mode 100644 testing/web-platform/tests/fenced-frame/key-scrolling.https.html create mode 100644 testing/web-platform/tests/fenced-frame/key-value-store.https.html create mode 100644 testing/web-platform/tests/fenced-frame/load-ad-with-size.https.html create mode 100644 testing/web-platform/tests/fenced-frame/loading.https.html create mode 100644 testing/web-platform/tests/fenced-frame/location-ancestorOrigins.https.html create mode 100644 testing/web-platform/tests/fenced-frame/mediaDevices-setCaptureHandle.https.html create mode 100644 testing/web-platform/tests/fenced-frame/multiple-component-ads.https.html create mode 100644 testing/web-platform/tests/fenced-frame/navigate-ancestor-by-name.https.html create mode 100644 testing/web-platform/tests/fenced-frame/navigate-ancestor-nested-fenced-frame.https.html create mode 100644 testing/web-platform/tests/fenced-frame/navigate-ancestor-nested-iframe.https.html create mode 100644 testing/web-platform/tests/fenced-frame/navigate-ancestor-top-level-fenced-frame.https.html create mode 100644 testing/web-platform/tests/fenced-frame/navigate-by-name-succeed.https.html create mode 100644 testing/web-platform/tests/fenced-frame/navigate-descendant-by-name.https.html create mode 100644 testing/web-platform/tests/fenced-frame/navigate-related-page-by-name.https.html create mode 100644 testing/web-platform/tests/fenced-frame/navigator-keyboard-layout-map.https.html create mode 100644 testing/web-platform/tests/fenced-frame/navigator-keyboard-lock.https.html create mode 100644 testing/web-platform/tests/fenced-frame/navigator-subapp.https.html create mode 100644 testing/web-platform/tests/fenced-frame/navigator-vibrate.https.html create mode 100644 testing/web-platform/tests/fenced-frame/navigator-virtualkeyboard.https.html create mode 100644 testing/web-platform/tests/fenced-frame/nested-opaque-ad-sizes.https.html create mode 100644 testing/web-platform/tests/fenced-frame/notification.https.html create mode 100644 testing/web-platform/tests/fenced-frame/opaque-ad-sizes-exact-size.https.html create mode 100644 testing/web-platform/tests/fenced-frame/opaque-ad-sizes-special-cases.https.html create mode 100644 testing/web-platform/tests/fenced-frame/payment-handler.https.html create mode 100644 testing/web-platform/tests/fenced-frame/payment-request.https.html create mode 100644 testing/web-platform/tests/fenced-frame/permission-api-denied-non-standard.https.html create mode 100644 testing/web-platform/tests/fenced-frame/permission-api-denied.https.html create mode 100644 testing/web-platform/tests/fenced-frame/permission-geolocation.https.html create mode 100644 testing/web-platform/tests/fenced-frame/permission-notification.https.html create mode 100644 testing/web-platform/tests/fenced-frame/picture-in-picture.https.html create mode 100644 testing/web-platform/tests/fenced-frame/popup-noopener.https.html create mode 100644 testing/web-platform/tests/fenced-frame/prerender.https.html create mode 100644 testing/web-platform/tests/fenced-frame/presentation-receiver.https.html create mode 100644 testing/web-platform/tests/fenced-frame/reinsert.https.html create mode 100644 testing/web-platform/tests/fenced-frame/report-event-inactive-document.https.html create mode 100644 testing/web-platform/tests/fenced-frame/report-event-reserved-event.https.html create mode 100644 testing/web-platform/tests/fenced-frame/report-event-sandboxed-iframe.https.html create mode 100644 testing/web-platform/tests/fenced-frame/resize-lock-input.https.html create mode 100644 testing/web-platform/tests/fenced-frame/resize-lock-zoom.https.html create mode 100644 testing/web-platform/tests/fenced-frame/resize-lock.https.html create mode 100644 testing/web-platform/tests/fenced-frame/resolve-to-config-promise.https.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/ancestor-throttle-iframe-csp.https.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/ancestor-throttle-iframe-csp.https.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/resources/ancestor-throttle-iframe-xfo.https.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/ancestor-throttle-iframe-xfo.https.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/resources/ancestor-throttle-inner.https.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/ancestor-throttle-inner.https.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/resources/ancestor-throttle-nested.https.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/ancestor-throttle-nested.https.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/resources/automatic-beacon-helper.js create mode 100644 testing/web-platform/tests/fenced-frame/resources/automatic-beacon-store.py create mode 100644 testing/web-platform/tests/fenced-frame/resources/automatic-beacon-unfenced-page.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/background-fetch-inner.https.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/background-fetch-inner.https.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/resources/background-fetch-sw-inner.https.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/background-fetch-sw-inner.https.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/resources/background-fetch-sw.js create mode 100644 testing/web-platform/tests/fenced-frame/resources/background-sync-helper.js create mode 100644 testing/web-platform/tests/fenced-frame/resources/background-sync-inner.https.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/background-sync-inner.https.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/resources/background-sync-sw-inner.https.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/background-sync-sw-inner.https.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/resources/background-sync-sw.js create mode 100644 testing/web-platform/tests/fenced-frame/resources/badging-sw.js create mode 100644 testing/web-platform/tests/fenced-frame/resources/before-unload-inner.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/before-unload-inner.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/resources/check-header-referrer.py create mode 100644 testing/web-platform/tests/fenced-frame/resources/check-header-sec-fetch-dest.py create mode 100644 testing/web-platform/tests/fenced-frame/resources/client-hints-iframe-inner.sub.https.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/client-hints-iframe-inner.sub.https.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/resources/client-hints-inner.sub.https.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/client-hints-inner.sub.https.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/resources/client-hints-meta-iframe-inner.sub.https.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/client-hints-meta-iframe-inner.sub.https.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/resources/client-hints-meta-inner.sub.https.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/client-hints-meta-inner.sub.https.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/resources/close.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/config-cross-origin-apis-inner.https.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/config-cross-origin-apis-inner.https.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/resources/config-cross-origin-iframe.https.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/config-cross-origin-iframe.https.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/resources/config-embed-cross-origin-iframe.https.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/config-embed-cross-origin-iframe.https.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/resources/content-index-sw.js create mode 100644 testing/web-platform/tests/fenced-frame/resources/cookie-access.https.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/cookie-access.https.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/resources/create-credential-inner.https.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/create-credential-inner.https.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/resources/create-popup.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/create-popup.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/resources/csp-fenced-frame-src-allowed-inner.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/csp-fenced-frame-src-allowed-inner.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/resources/csp-fenced-frame-src-blocked-inner.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/csp-fenced-frame-src-blocked-inner.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/resources/csp-frame-src-allowed-inner.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/csp-frame-src-allowed-inner.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/resources/csp-frame-src-blocked-inner.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/csp-frame-src-blocked-inner.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/resources/csp-inner.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/csp-inner.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/resources/csp.png create mode 100644 testing/web-platform/tests/fenced-frame/resources/dangling-markup-helper.js create mode 100644 testing/web-platform/tests/fenced-frame/resources/default-enabled-features-helper.js create mode 100644 testing/web-platform/tests/fenced-frame/resources/default-enabled-features-navigate.https.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/default-enabled-features-navigate.https.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/resources/default-enabled-features-subframe-fencedframe.https.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/default-enabled-features-subframe-fencedframe.https.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/resources/default-enabled-features-subframe-iframe.https.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/default-enabled-features-subframe-iframe.https.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/resources/download-helper.js create mode 100644 testing/web-platform/tests/fenced-frame/resources/download-inner.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/download-inner.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/resources/download-stash.py create mode 100644 testing/web-platform/tests/fenced-frame/resources/dummy.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/embeddee.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/embeddee.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/resources/embedder-policy.js create mode 100644 testing/web-platform/tests/fenced-frame/resources/empty-worker.js create mode 100644 testing/web-platform/tests/fenced-frame/resources/fedcm-get-credential-inner.https.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/fedcm-get-credential-inner.https.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/resources/fence-api-inner.https.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/fence-api-inner.https.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/resources/fenced-frame-loaded.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/fenced-frame-loaded.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/resources/fenced-frame-set-name-and-report-ready-for-outermost-document-to-navigate.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/fenced-frame-set-name-and-report-ready-for-outermost-document-to-navigate.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/resources/fledge-bidding-logic.py create mode 100644 testing/web-platform/tests/fenced-frame/resources/fledge-decision-logic.py create mode 100644 testing/web-platform/tests/fenced-frame/resources/frame-navigation-inner-create-nested.https.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/frame-navigation-inner-create-nested.https.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/resources/frame-navigation-inner-simple.https.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/frame-navigation-inner-simple.https.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/resources/frame-with-intersection-observer.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/frame-with-intersection-observer.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/resources/gamepad-inner.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/gamepad-inner.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/resources/get-nested-configs-inner.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/get-nested-configs-inner.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/resources/get-nested-configs-nested-iframe.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/get-nested-configs-nested-iframe.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/resources/get_battery.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/get_battery.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/resources/header-referrer-inner.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/header-referrer-inner.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/resources/header-secFetchDest-inner.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/header-secFetchDest-inner.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/resources/history-back-and-forward-should-not-work-in-fenced-tree-inner.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/history-back-and-forward-should-not-work-in-fenced-tree-inner.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/resources/history-length-fenced-navigations-replace-do-not-contribute-to-joint-inner.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/history-length-fenced-navigations-replace-do-not-contribute-to-joint-inner.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/resources/history-length-outer-page-navigation-not-reflected-in-fenced-inner.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/history-length-outer-page-navigation-not-reflected-in-fenced-inner.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/resources/ignore-child-fenced-frame-onload-event-inner.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/ignore-child-fenced-frame-onload-event-inner.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/resources/key-value-store.py create mode 100644 testing/web-platform/tests/fenced-frame/resources/location-ancestorOrigins-inner.https.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/location-ancestorOrigins-inner.https.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/resources/navigate-ancestor-destination.https.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/navigate-ancestor-destination.https.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/resources/navigate-ancestor-from-nested-fenced-frame.https.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/navigate-ancestor-from-nested-fenced-frame.https.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/resources/navigate-ancestor-from-nested-iframe.https.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/navigate-ancestor-from-nested-iframe.https.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/resources/navigate-ancestor-helper.https.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/navigate-ancestor-helper.https.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/resources/navigate-ancestor-helper.js create mode 100644 testing/web-platform/tests/fenced-frame/resources/navigate-ancestor-test-runner.https.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/navigate-by-name-inner.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/navigate-by-name-inner.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/resources/navigate-by-name-reporting-helper.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/navigate-by-name-reporting-helper.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/resources/navigate-nested-config.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/navigate-nested-config.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/resources/navigator-keyboard-layout-map-inner.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/navigator-keyboard-layout-map-inner.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/resources/navigator-keyboard-lock-inner.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/navigator-keyboard-lock-inner.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/resources/notification-sw.js create mode 100644 testing/web-platform/tests/fenced-frame/resources/opaque-ad-sizes-utils.js create mode 100644 testing/web-platform/tests/fenced-frame/resources/payment-handler-sw.js create mode 100644 testing/web-platform/tests/fenced-frame/resources/permission-api-denied-inner.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/permission-api-denied-inner.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/resources/permission-geolocation-inner.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/permission-geolocation-inner.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/resources/permission-geolocation-test-runner.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/permission-notification-inner.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/permission-notification-inner.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/resources/popup-noopener-destination.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/popup-noopener-inner.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/popup-noopener-inner.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/resources/postmessage-config.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/prerender-inner.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/prerender-inner.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/resources/presentation-receiver-inner.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/presentation-receiver-inner.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/resources/remote-context-executor.https.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/report-url.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/report-url.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/resources/resize-lock-inner.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/resize-lock-inner.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/resources/response-204.py create mode 100644 testing/web-platform/tests/fenced-frame/resources/sandbox-mandatory-flags-iframe.sub.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/sandbox-mandatory-flags-inner.sub.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/sandbox-mandatory-flags-inner.sub.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/resources/sandbox-mandatory-flags-looser-restriction.sub.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/sandboxed-features-inner.sub.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/sandboxed-features-inner.sub.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/resources/sandboxed-features-looser-restriction.sub.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/sandboxed-features-looser-restriction.sub.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/resources/sandboxed-features.js create mode 100644 testing/web-platform/tests/fenced-frame/resources/serviceWorker-dedicated-worker-inner.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/serviceWorker-dedicated-worker-inner.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/resources/serviceWorker-dedicated-worker-sw.js create mode 100644 testing/web-platform/tests/fenced-frame/resources/serviceWorker-dedicated-worker-sw.js.headers create mode 100644 testing/web-platform/tests/fenced-frame/resources/serviceWorker-dedicated-worker.js create mode 100644 testing/web-platform/tests/fenced-frame/resources/serviceWorker-frameType-inner.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/serviceWorker-frameType-inner.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/resources/serviceWorker-frameType-nested.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/serviceWorker-frameType-nested.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/resources/serviceWorker-frameType.js create mode 100644 testing/web-platform/tests/fenced-frame/resources/serviceWorker-navigate-inner-success.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/serviceWorker-navigate-inner-success.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/resources/serviceWorker-navigate-inner.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/serviceWorker-navigate-inner.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/resources/serviceWorker-navigate.js create mode 100644 testing/web-platform/tests/fenced-frame/resources/serviceWorker-push-sw.js create mode 100644 testing/web-platform/tests/fenced-frame/resources/unique-cookie-partition-inner.https.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/unique-cookie-partition-inner.https.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/resources/unreached.https.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/utils.js create mode 100644 testing/web-platform/tests/fenced-frame/resources/web-bluetooth-inner.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/web-bluetooth-inner.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/resources/web-nfc-inner.https.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/web-nfc-inner.https.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/resources/web-share-inner.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/web-share-inner.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/resources/window-frameElement-inner.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/window-frameElement-inner.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/resources/window-navigation-204-inner.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/window-navigation-204-inner.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/resources/window-outer-dimensions-inner.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/window-outer-dimensions-inner.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/resources/window-parent-inner.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/window-parent-inner.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/resources/window-top-inner.html create mode 100644 testing/web-platform/tests/fenced-frame/resources/window-top-inner.html.headers create mode 100644 testing/web-platform/tests/fenced-frame/revoke-nested-fenced-frame-in-iframe-navigation.https.html create mode 100644 testing/web-platform/tests/fenced-frame/revoke-nested-fenced-frame-navigation.https.html create mode 100644 testing/web-platform/tests/fenced-frame/revoke-unfenced-top-navigation.https.html create mode 100644 testing/web-platform/tests/fenced-frame/sandbox-attribute.https.html create mode 100644 testing/web-platform/tests/fenced-frame/sandbox-mandatory-flags.https.html create mode 100644 testing/web-platform/tests/fenced-frame/sandboxed-features-alert.https.html create mode 100644 testing/web-platform/tests/fenced-frame/sandboxed-features-confirm.https.html create mode 100644 testing/web-platform/tests/fenced-frame/sandboxed-features-documentdomain.https.html create mode 100644 testing/web-platform/tests/fenced-frame/sandboxed-features-pointerlock.https.html create mode 100644 testing/web-platform/tests/fenced-frame/sandboxed-features-presentation-request.https.html create mode 100644 testing/web-platform/tests/fenced-frame/sandboxed-features-printdialog.https.html create mode 100644 testing/web-platform/tests/fenced-frame/sandboxed-features-prompt.https.html create mode 100644 testing/web-platform/tests/fenced-frame/sandboxed-features-screen-orientation-lock.https.html create mode 100644 testing/web-platform/tests/fenced-frame/script-focus.https.html create mode 100644 testing/web-platform/tests/fenced-frame/scroll-into-view.https.html create mode 100644 testing/web-platform/tests/fenced-frame/selecturl-flexible-size.https.html create mode 100644 testing/web-platform/tests/fenced-frame/self-urn-navigation.https.html create mode 100644 testing/web-platform/tests/fenced-frame/serviceWorker-dedicated-worker.https.html create mode 100644 testing/web-platform/tests/fenced-frame/serviceWorker-frameType.https.html create mode 100644 testing/web-platform/tests/fenced-frame/serviceWorker-push.https.html create mode 100644 testing/web-platform/tests/fenced-frame/set-automatic-beacon.https.html create mode 100644 testing/web-platform/tests/fenced-frame/setting-null-config-navigates-to-about-blank.https.html create mode 100644 testing/web-platform/tests/fenced-frame/show-directory-picker.https.html create mode 100644 testing/web-platform/tests/fenced-frame/show-open-file-picker.https.html create mode 100644 testing/web-platform/tests/fenced-frame/storage-partitioning.https.html create mode 100644 testing/web-platform/tests/fenced-frame/subframe-loading.https.html create mode 100644 testing/web-platform/tests/fenced-frame/unique-cookie-partition.https.html create mode 100644 testing/web-platform/tests/fenced-frame/user-activation.https.html create mode 100644 testing/web-platform/tests/fenced-frame/visual-viewport.https.html create mode 100644 testing/web-platform/tests/fenced-frame/web-bluetooth.https.html create mode 100644 testing/web-platform/tests/fenced-frame/web-nfc.https.html create mode 100644 testing/web-platform/tests/fenced-frame/web-share.https.html create mode 100644 testing/web-platform/tests/fenced-frame/web-usb.https.html create mode 100644 testing/web-platform/tests/fenced-frame/window-close.https.html create mode 100644 testing/web-platform/tests/fenced-frame/window-frameElement.https.html create mode 100644 testing/web-platform/tests/fenced-frame/window-navigation-204.https.html create mode 100644 testing/web-platform/tests/fenced-frame/window-outer-dimensions.https.html create mode 100644 testing/web-platform/tests/fenced-frame/window-parent.https.html create mode 100644 testing/web-platform/tests/fenced-frame/window-top.https.html (limited to 'testing/web-platform/tests/fenced-frame') diff --git a/testing/web-platform/tests/fenced-frame/README.md b/testing/web-platform/tests/fenced-frame/README.md new file mode 100644 index 0000000000..3dc65fbc05 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/README.md @@ -0,0 +1,225 @@ +# Fenced Frames + +This directory contains [Web Platform +Tests](third_party/blink/web_tests/external/wpt) for the [Fenced +Frames](https://github.com/shivanigithub/fenced-frame) feature.). + +In general, these tests should follow Chromium's [web tests +guidelines](docs/testing/web_tests_tips.md) and [web-platform-tests +guidelines](/docs/testing/web_platform_tests.md). This document describes +how to use the specific fenced frame testing infrastructure. + +## How to run tests +Fenced frames feature needs to be enabled to run tests. A convenient way to +do this is to define the following variable for fenced frames [virtual test +suites](https://chromium.googlesource.com/chromium/src/+/HEAD/docs/testing/web_tests.md#virtual-test-suites) +directories. +```bash +export MPTEST=virtual/fenced-frame-mparch/external/wpt/fenced-frame +``` + +Then run tests under the virtual test suite. This will include necessary +fenced frame flags. +```bash +third_party/blink/tools/run_web_tests.py -t Default $MPTEST/test-name.https.html +``` + +## How to write tests + +The `` element has a strict requirement that it cannot directly +communicate with or reach its embedder document. The fenced frame does have +network access however, so we can use a server as a middleman to communicate +with the outer page. There are two main test patterns we use: remote execution +(recommended) and message passing (deprecated). + +### Remote execution + +Remote execution uses the helper `attachFencedFrameContext()` defined in +[resources/utils.js](resources/utils.js), which requires +[/common/dispatcher/dispatcher.js](/common/dispatcher/dispatcher.js) and +[/common/utils.js](/common/utils.js). This returns a fenced frame that is +wrapped with additional functionality from RemoteContext, which allows you to +perform a remote procedure call into the frame using the function +`execute(function, [arguments]=[])`. + +This interface allows us to write an entire test in only one file, with minimal +boilerplate and an obvious control flow between all the frames on the page +(including nested fenced frames, which can be achieved with nested `execute` +calls). + +Let's see an example of communication between the top-level frame and the fenced +frame. + +```js +promise_test(async () => { + const important_value = "Hello"; + + // First, create an empty fenced frame. + const frame = attachFencedFrameContext(); + + // Next, make a function call into the frame, passing a particular string + // "Hello" as an argument. Make sure to `await` the call. + const response = await frame.execute((message_from_embedder) => { + + // This code runs inside the fenced frame. + if (message_from_embedder == "Hello") { + // Message that we received was expected. + return "Hello to you too"); + } else { + // Message that we received was *not* expected, let's report an error to + // the outer page so it fails the test. + return "Unexpected message"; + } + + }, [important_value]); + + // Assert that the returned value was what we expected. + // Keep in mind that in a less contrived example, you can perform this assert + // inside the fenced frame. + assert_equals(response, "Hello to you too", + "The fenced frame received the message, and said hello back to us".) +}, "Fenced frame and receive and send a greeting"); +``` + +For test examples, see +[document-referrer.https.html](document-referrer.https.html), +[hid.https.html](hid.https.html), +or [web-usb.https.html](web-usb.https.html). + +Some tips to keep in mind while writing tests using remote execution: +* The functions `attachFencedFrameContext()` and `attachIFrameContext()` + optionally take a dictionary of configs as an argument. You can use it to + pass: + * The API you want to use to generate the fenced frame urn. Either `'fledge'`, + `'sharedstorage'`, or default (case-insensitive). When you use this option, + the return value becomes a promise so you **must** await it.For example: + ``` + await attachFencedFrameContext({generator_api: 'fledge'}); + ``` + * HTML source code to inject into the frame's DOM tree. For example: + ``` + attachFencedFrameContext({html: ''}); + ``` + * Response headers. For example: + ``` + attachFencedFrameContext({headers: [["Content-Security-Policy", "frame-src 'self'"]]}); + ``` + * Attributes to set on the frame. For example: + ``` + attachIFrameContext({attributes: [["csp", "frame-src 'self'"]]}) + ``` + * Origin of the url to allow cross-origin test. For example: + ``` + attachIFrameContext({origin:get_host_info().HTTPS_REMOTE_ORIGIN}) + ``` + * Number of ad components to create the frame with. Note that this only works + with `generator_api: 'fledge'`. Protected Audience supports up to 20 ad + components per auction. + ``` + attachFencedFrameContext({num_components: 1}); + attachIFrameContext({num_components: 20}); + ``` + After creating the frame with ad components, the ad component frame won't + be created until you explicitly call a special creator from within the + frame. + ``` + attachComponentFencedFrameContext(0, {html: "Hello, world!"}); + attachComponentIFrameContext(19); + ``` + This takes in an index, and, optionally, the `html` and `attributes` fields + as described above. +* There is also a helper `attachIFrameContext()`, which does the same thing + but for iframes instead of fencedframes. +* There is also a helper `replaceFrameContext(frame, {options})` which will + replace an existing frame context using the same underlying element (i.e., you + can use it to test when happens when you navigate an existing frame). +* Make sure to `await` the result of an `execute` call, even if it doesn't + return anything. +* In order to save a global variable, you need to explicitly assign to + `window.variable_name`. Assigning to `variable_name` without declaring it + will not persist across `execute` calls. This is especially important for + tests with nested frames, if you want to keep a handle to the nested frame + across multiple calls. +* Remember to declare the function passed to `execute` as async if it itself + needs to invoke any async functions, including to create nested frames. + +### Message passing (deprecated) + +Message passing is done by using the helpers +defined in +[resources/utils.js](third_party/blink/web_tests/wpt_internal/fenced_frame/resources/utils.js) +to send a message to the server, and poll the server for a response. All +messages have a unique key associated with them so that documents that want to +receive messages can poll the server for a given message that can be identified +by a unique key. + +Let's see an example of sending a message to the server that a fenced frame will +receive and respond to. + +**outer-page.js:** +```js +promise_test(async () => { + const important_message_key = token(); + const fenced_frame_ack_key = token(); + const important_value = "Hello"; + + // First, let's embed a new fenced frame in our test, and pass the key we + // just created into it as a parameter. + const frame_url = generateURL("resources/page-inner.html", + [important_message_key, fenced_frame_ack_key]); + attachFencedFrame(frame_url); + + // Then, let's send the message over to the fenced frame. + writeValueToServer(important_message_key, important_value); + + // Now that the message has been sent to the fenced frame, let's wait for its + // ACK, so that we don't exit the test before the fenced frame gets the + // message. + const response_from_fenced_frame = await + nextValueFromServer(fenced_frame_ack_key); + assert_equals(response_from_fenced_frame, "Hello to you too", + "The fenced frame received the message, and said hello back to us"); +}, "Fenced frame and receive and send a greeting"); +``` + +**inner-fenced-frame.js:** + +```js +async function init() { // Needed in order to use top-level await. + const [important_message_key, fenced_frame_ack_key] = parseKeylist(); + const greeting_from_embedder = await nextValueFromServer(important_message_key); + + if (greeting_from_embedder == "Hello") { + // Message that we received was expected. + writeValueToServer(fenced_frame_ack_key, "Hello to you too"); + } else { + // Message that we received was *not* expected, let's report an error to the + // outer page so it fails the test. + writeValueToServer(fenced_frame_ack_key, "Unexpected message"); + } +} + +init(); +``` + +When you write a new web platform test, it will likely involve passing a _new_ +message like the messages above, to and from the fenced frame. Keep in mind +that you may have to use a _pair_ of keys, so that when one document writes a +message associated with one unique key, it can listen for an ACK from the +receiving document, so that it doesn't write over the message again before the +receiving document actually reads it. **No two tests should ever use the same +key to communicate information to and from a fenced frame**, as this will cause +server-side race conditions. + +For a good test example, see +[window-parent.html](window-parent.html). + +## Underlying implementations + +This directory contains tests that exercise the +`blink::features::kFencedFrames` feature. + +## Wrap lines at 80 columns + +This is the convention for most Chromium/WPT style tests. Note that +`git cl format [--js]` does not reformat js code in .html files. diff --git a/testing/web-platform/tests/fenced-frame/add-fencedframe-to-detached-iframe.https.html b/testing/web-platform/tests/fenced-frame/add-fencedframe-to-detached-iframe.https.html new file mode 100644 index 0000000000..37c0cd6cba --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/add-fencedframe-to-detached-iframe.https.html @@ -0,0 +1,36 @@ + +Test Add Fenced Frame to Detached Iframe + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/ancestor-throttle.https.html b/testing/web-platform/tests/fenced-frame/ancestor-throttle.https.html new file mode 100644 index 0000000000..9b6dfb0d30 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/ancestor-throttle.https.html @@ -0,0 +1,87 @@ + + +Test frame-ancestor + + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/anchor-focus.https.html b/testing/web-platform/tests/fenced-frame/anchor-focus.https.html new file mode 100644 index 0000000000..262781f571 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/anchor-focus.https.html @@ -0,0 +1,47 @@ + +Anchor based focusing across a fenced frame boundary + + + + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/autofocus-denied.https.html b/testing/web-platform/tests/fenced-frame/autofocus-denied.https.html new file mode 100644 index 0000000000..ff6955a3b2 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/autofocus-denied.https.html @@ -0,0 +1,25 @@ + +Autofocusing is blocked in a fenced frame + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/automatic-beacon-anchor-click-handler.https.html b/testing/web-platform/tests/fenced-frame/automatic-beacon-anchor-click-handler.https.html new file mode 100644 index 0000000000..8ee1cb517f --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/automatic-beacon-anchor-click-handler.https.html @@ -0,0 +1,63 @@ + +Test window.fence.setReportEventDataForAutomaticBeacons + + + + + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/automatic-beacon-click-handler.https.html b/testing/web-platform/tests/fenced-frame/automatic-beacon-click-handler.https.html new file mode 100644 index 0000000000..31392fdb99 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/automatic-beacon-click-handler.https.html @@ -0,0 +1,61 @@ + +Test window.fence.setReportEventDataForAutomaticBeacons + + + + + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/automatic-beacon-component-ad.https.html b/testing/web-platform/tests/fenced-frame/automatic-beacon-component-ad.https.html new file mode 100644 index 0000000000..1b1ef2798a --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/automatic-beacon-component-ad.https.html @@ -0,0 +1,56 @@ + +Test automatic beacons in ad components + + + + + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/automatic-beacon-cross-origin-false.https.html b/testing/web-platform/tests/fenced-frame/automatic-beacon-cross-origin-false.https.html new file mode 100644 index 0000000000..24440e4b67 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/automatic-beacon-cross-origin-false.https.html @@ -0,0 +1,42 @@ + +Test window.fence.setReportEventDataForAutomaticBeacons from + SharedStorage + + + + + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/automatic-beacon-cross-origin-navigation.https.html b/testing/web-platform/tests/fenced-frame/automatic-beacon-cross-origin-navigation.https.html new file mode 100644 index 0000000000..c476e80443 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/automatic-beacon-cross-origin-navigation.https.html @@ -0,0 +1,42 @@ + +Test cross-origin automatic beacons + + + + + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/automatic-beacon-cross-origin-no-data.https.html b/testing/web-platform/tests/fenced-frame/automatic-beacon-cross-origin-no-data.https.html new file mode 100644 index 0000000000..dd00721dd8 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/automatic-beacon-cross-origin-no-data.https.html @@ -0,0 +1,47 @@ + +Test cross-origin automatic beacons without data + + + + + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/automatic-beacon-cross-origin-no-opt-in.https.html b/testing/web-platform/tests/fenced-frame/automatic-beacon-cross-origin-no-opt-in.https.html new file mode 100644 index 0000000000..fa19d17f89 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/automatic-beacon-cross-origin-no-opt-in.https.html @@ -0,0 +1,45 @@ + +Test cross-origin automatic beacons without opt-in + + + + + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/automatic-beacon-no-destination.https.html b/testing/web-platform/tests/fenced-frame/automatic-beacon-no-destination.https.html new file mode 100644 index 0000000000..696c17f765 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/automatic-beacon-no-destination.https.html @@ -0,0 +1,44 @@ + +Test window.fence.setReportEventDataForAutomaticBeacons + + + + + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/automatic-beacon-no-opt-in.https.html b/testing/web-platform/tests/fenced-frame/automatic-beacon-no-opt-in.https.html new file mode 100644 index 0000000000..177a7c6a51 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/automatic-beacon-no-opt-in.https.html @@ -0,0 +1,48 @@ + +Test window.fence.setReportEventDataForAutomaticBeacons opt out + + + + + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/automatic-beacon-shared-storage.https.html b/testing/web-platform/tests/fenced-frame/automatic-beacon-shared-storage.https.html new file mode 100644 index 0000000000..4ee1d0d01b --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/automatic-beacon-shared-storage.https.html @@ -0,0 +1,45 @@ + +Test window.fence.setReportEventDataForAutomaticBeacons from + SharedStorage + + + + + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/automatic-beacon-two-events-clear.https.html b/testing/web-platform/tests/fenced-frame/automatic-beacon-two-events-clear.https.html new file mode 100644 index 0000000000..f759c0620b --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/automatic-beacon-two-events-clear.https.html @@ -0,0 +1,52 @@ + +Test setReportEventDataForAutomaticBeacons called only once + + + + + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/automatic-beacon-two-events-persist.https.html b/testing/web-platform/tests/fenced-frame/automatic-beacon-two-events-persist.https.html new file mode 100644 index 0000000000..906a7a0d9f --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/automatic-beacon-two-events-persist.https.html @@ -0,0 +1,48 @@ + +Test setReportEventDataForAutomaticBeacons called only once + + + + + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/automatic-beacon-unfenced-top.https.html b/testing/web-platform/tests/fenced-frame/automatic-beacon-unfenced-top.https.html new file mode 100644 index 0000000000..342e13321f --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/automatic-beacon-unfenced-top.https.html @@ -0,0 +1,55 @@ + +Test automatic beacons sent from an '_unfencedTop' navigation + + + + + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/automatic-beacon-use-ancestor-data.https.html b/testing/web-platform/tests/fenced-frame/automatic-beacon-use-ancestor-data.https.html new file mode 100644 index 0000000000..39df6f5c73 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/automatic-beacon-use-ancestor-data.https.html @@ -0,0 +1,62 @@ + +Test ancestor data for automatic beacons + + + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/background-fetch.https.html b/testing/web-platform/tests/fenced-frame/background-fetch.https.html new file mode 100644 index 0000000000..7036f2bb5f --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/background-fetch.https.html @@ -0,0 +1,128 @@ + +Test fenced frame does not allow call background fetch + + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/background-sync.https.html b/testing/web-platform/tests/fenced-frame/background-sync.https.html new file mode 100644 index 0000000000..72eb44750b --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/background-sync.https.html @@ -0,0 +1,218 @@ + +Test fenced frame does not allow to register background sync + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/badging.https.html b/testing/web-platform/tests/fenced-frame/badging.https.html new file mode 100644 index 0000000000..93683e096c --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/badging.https.html @@ -0,0 +1,79 @@ + +Test Badging API + + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/battery_status.https.html b/testing/web-platform/tests/fenced-frame/battery_status.https.html new file mode 100644 index 0000000000..d7e1dc0284 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/battery_status.https.html @@ -0,0 +1,19 @@ + +Battery status API test + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/before-unload.https.html b/testing/web-platform/tests/fenced-frame/before-unload.https.html new file mode 100644 index 0000000000..d924b1d1a4 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/before-unload.https.html @@ -0,0 +1,25 @@ + +Test the before unload event + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/can-load-api.https.html b/testing/web-platform/tests/fenced-frame/can-load-api.https.html new file mode 100644 index 0000000000..f9996dd5e9 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/can-load-api.https.html @@ -0,0 +1,68 @@ + +Test canLoadOpaqueURL API + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/change-src-attribute-after-config-installation-does-not-trigger-navigation.https.html b/testing/web-platform/tests/fenced-frame/change-src-attribute-after-config-installation-does-not-trigger-navigation.https.html new file mode 100644 index 0000000000..7ad73d3a4b --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/change-src-attribute-after-config-installation-does-not-trigger-navigation.https.html @@ -0,0 +1,52 @@ + + + + + + +Test changing a fenced frame's src attribute when there has been a config +with url installed already does not trigger navigation. + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/client-hints-meta.https.html b/testing/web-platform/tests/fenced-frame/client-hints-meta.https.html new file mode 100644 index 0000000000..3a4acf1b26 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/client-hints-meta.https.html @@ -0,0 +1,40 @@ + + + +Client hints in fenced frames test + + + + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/client-hints.https.html b/testing/web-platform/tests/fenced-frame/client-hints.https.html new file mode 100644 index 0000000000..fc7b8db08d --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/client-hints.https.html @@ -0,0 +1,36 @@ + +Client hints in fenced frames test + + + + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/client-hints.https.html.headers b/testing/web-platform/tests/fenced-frame/client-hints.https.html.headers new file mode 100644 index 0000000000..56ce611418 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/client-hints.https.html.headers @@ -0,0 +1,3 @@ +Accept-CH: sec-ch-viewport-width, sec-ch-ua-reduced +Feature-Policy: ch-viewport-width *, ch-ua-reduced * +Access-Control-Allow-Origin: * diff --git a/testing/web-platform/tests/fenced-frame/compute-pressure.https.html b/testing/web-platform/tests/fenced-frame/compute-pressure.https.html new file mode 100644 index 0000000000..81091afc8e --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/compute-pressure.https.html @@ -0,0 +1,34 @@ + +Verify that Compute Pressure API from a fenced frame is blocked + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/config-cross-origin-apis.https.html b/testing/web-platform/tests/fenced-frame/config-cross-origin-apis.https.html new file mode 100644 index 0000000000..2d6b97e1aa --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/config-cross-origin-apis.https.html @@ -0,0 +1,44 @@ + +Test default permission policy features gating (*) + + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/config-installation-triggers-navigation-of-navigated-fenced-frame.https.html b/testing/web-platform/tests/fenced-frame/config-installation-triggers-navigation-of-navigated-fenced-frame.https.html new file mode 100644 index 0000000000..74f810f6d2 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/config-installation-triggers-navigation-of-navigated-fenced-frame.https.html @@ -0,0 +1,38 @@ + + + + + + +Test installing an config to a navigated fenced frame triggers + navigation. + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/config-installation-triggers-navigation.https.html b/testing/web-platform/tests/fenced-frame/config-installation-triggers-navigation.https.html new file mode 100644 index 0000000000..6a7238da05 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/config-installation-triggers-navigation.https.html @@ -0,0 +1,34 @@ + + + + + + +Test fenced frame config installation triggers navigation. + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/config-with-empty-url-installation-unloads-navigated-fenced-frame.https.html b/testing/web-platform/tests/fenced-frame/config-with-empty-url-installation-unloads-navigated-fenced-frame.https.html new file mode 100644 index 0000000000..13e6904cf9 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/config-with-empty-url-installation-unloads-navigated-fenced-frame.https.html @@ -0,0 +1,44 @@ + + + + + + +Test installing a config with empty url to a navigated fenced frame + unloads the original document + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/consume-user-activation.https.html b/testing/web-platform/tests/fenced-frame/consume-user-activation.https.html new file mode 100644 index 0000000000..e4ad20d17b --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/consume-user-activation.https.html @@ -0,0 +1,95 @@ + +Test that user activation propagation is fenced. + + + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/content-index.https.html b/testing/web-platform/tests/fenced-frame/content-index.https.html new file mode 100644 index 0000000000..99af848492 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/content-index.https.html @@ -0,0 +1,150 @@ + +Test Content Index API + + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/coop-bcg-swap.https.html b/testing/web-platform/tests/fenced-frame/coop-bcg-swap.https.html new file mode 100644 index 0000000000..5a414fdfa1 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/coop-bcg-swap.https.html @@ -0,0 +1,40 @@ + +Test window.name after bcg swap + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/create-credential.https.html b/testing/web-platform/tests/fenced-frame/create-credential.https.html new file mode 100644 index 0000000000..15f0558e52 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/create-credential.https.html @@ -0,0 +1,25 @@ + +Test WebAuthn navigator.credentials.create() + + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/create-in-sandbox-and-adopt-outside-sandbox.https.html b/testing/web-platform/tests/fenced-frame/create-in-sandbox-and-adopt-outside-sandbox.https.html new file mode 100644 index 0000000000..4b4817b863 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/create-in-sandbox-and-adopt-outside-sandbox.https.html @@ -0,0 +1,35 @@ + +Test fenced frame sandbox adoption + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/csp-allowed.https.html b/testing/web-platform/tests/fenced-frame/csp-allowed.https.html new file mode 100644 index 0000000000..8c002bc8a9 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/csp-allowed.https.html @@ -0,0 +1,40 @@ + +Test opaque fenced frame navigations with allowed CSP + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/csp-blocked.https.html b/testing/web-platform/tests/fenced-frame/csp-blocked.https.html new file mode 100644 index 0000000000..3826fdd7f4 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/csp-blocked.https.html @@ -0,0 +1,65 @@ + +Test opaque fenced frame navigations with disallowed CSP blocked + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/csp-fenced-frame-src-allowed.https.html b/testing/web-platform/tests/fenced-frame/csp-fenced-frame-src-allowed.https.html new file mode 100644 index 0000000000..cf603c29a6 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/csp-fenced-frame-src-allowed.https.html @@ -0,0 +1,22 @@ + + +Test Content-Security-Policy fenced-frame-src + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/csp-fenced-frame-src-blocked.https.html b/testing/web-platform/tests/fenced-frame/csp-fenced-frame-src-blocked.https.html new file mode 100644 index 0000000000..46f8778d47 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/csp-fenced-frame-src-blocked.https.html @@ -0,0 +1,37 @@ + + +Test Content-Security-Policy fenced-frame-src + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/csp-frame-src-allowed.https.html b/testing/web-platform/tests/fenced-frame/csp-frame-src-allowed.https.html new file mode 100644 index 0000000000..08c51fc3ac --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/csp-frame-src-allowed.https.html @@ -0,0 +1,22 @@ + + +Test Content-Security-Policy fenced-frame-src falling back to frame-src + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/csp-frame-src-blocked.https.html b/testing/web-platform/tests/fenced-frame/csp-frame-src-blocked.https.html new file mode 100644 index 0000000000..88e4a8b89f --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/csp-frame-src-blocked.https.html @@ -0,0 +1,36 @@ + + + +Test Content-Security-Policy fenced-frame-src falling back to frame-src + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/csp-transparent-url.https.html b/testing/web-platform/tests/fenced-frame/csp-transparent-url.https.html new file mode 100644 index 0000000000..c1c815d49e --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/csp-transparent-url.https.html @@ -0,0 +1,53 @@ + +Test transparent url navigated in fenced frame interacting with CSP + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/csp.https.html b/testing/web-platform/tests/fenced-frame/csp.https.html new file mode 100644 index 0000000000..6daa6a96e8 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/csp.https.html @@ -0,0 +1,39 @@ + + Test Content Security Policy + + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/cspee.https.html b/testing/web-platform/tests/fenced-frame/cspee.https.html new file mode 100644 index 0000000000..70c9744b74 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/cspee.https.html @@ -0,0 +1,74 @@ + +Test fenced frame in CSPEE + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/deep-copy-config.https.html b/testing/web-platform/tests/fenced-frame/deep-copy-config.https.html new file mode 100644 index 0000000000..54a976233c --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/deep-copy-config.https.html @@ -0,0 +1,108 @@ + +Test deep copying FencedFrameConfig objects + + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/default-enabled-features-allow-all.https.html b/testing/web-platform/tests/fenced-frame/default-enabled-features-allow-all.https.html new file mode 100644 index 0000000000..5d38d7a710 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/default-enabled-features-allow-all.https.html @@ -0,0 +1,74 @@ + +Test default permission policy features gating (*) + + + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/default-enabled-features-allow-all.https.html.headers b/testing/web-platform/tests/fenced-frame/default-enabled-features-allow-all.https.html.headers new file mode 100644 index 0000000000..c3d2f1fcfb --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/default-enabled-features-allow-all.https.html.headers @@ -0,0 +1 @@ +Permissions-Policy: attribution-reporting=(*), private-aggregation=(*), shared-storage=(*) \ No newline at end of file diff --git a/testing/web-platform/tests/fenced-frame/default-enabled-features-allow-none.https.html b/testing/web-platform/tests/fenced-frame/default-enabled-features-allow-none.https.html new file mode 100644 index 0000000000..1c7d0579eb --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/default-enabled-features-allow-none.https.html @@ -0,0 +1,46 @@ + +Test default permission policy features gating () + + + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/default-enabled-features-allow-none.https.html.headers b/testing/web-platform/tests/fenced-frame/default-enabled-features-allow-none.https.html.headers new file mode 100644 index 0000000000..2aa0b2f5ae --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/default-enabled-features-allow-none.https.html.headers @@ -0,0 +1 @@ +Permissions-Policy: attribution-reporting=(), shared-storage=(), private-aggregation=() \ No newline at end of file diff --git a/testing/web-platform/tests/fenced-frame/default-enabled-features-allow-self.https.html b/testing/web-platform/tests/fenced-frame/default-enabled-features-allow-self.https.html new file mode 100644 index 0000000000..3724a4795e --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/default-enabled-features-allow-self.https.html @@ -0,0 +1,67 @@ + +Test default permission policy features gating (self) + + + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/default-enabled-features-allow-self.https.html.headers b/testing/web-platform/tests/fenced-frame/default-enabled-features-allow-self.https.html.headers new file mode 100644 index 0000000000..76ab816ec0 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/default-enabled-features-allow-self.https.html.headers @@ -0,0 +1 @@ +Permissions-Policy: attribution-reporting=(self), private-aggregation=(self), shared-storage=(self) \ No newline at end of file diff --git a/testing/web-platform/tests/fenced-frame/default-enabled-features-allow-unspecified.https.html b/testing/web-platform/tests/fenced-frame/default-enabled-features-allow-unspecified.https.html new file mode 100644 index 0000000000..69e9a157cf --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/default-enabled-features-allow-unspecified.https.html @@ -0,0 +1,59 @@ + +Test permission policies with no permissions specified + + + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/default-enabled-features-attribute-allow.https.html b/testing/web-platform/tests/fenced-frame/default-enabled-features-attribute-allow.https.html new file mode 100644 index 0000000000..d1e857cf29 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/default-enabled-features-attribute-allow.https.html @@ -0,0 +1,72 @@ + +Test default permission policy features with allow="" attribute + + + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/default-enabled-features-attribute-change.https.html b/testing/web-platform/tests/fenced-frame/default-enabled-features-attribute-change.https.html new file mode 100644 index 0000000000..09bcde5e31 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/default-enabled-features-attribute-change.https.html @@ -0,0 +1,50 @@ + +Test changing the allow="" attribute after a navigation + + + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/default-enabled-features-attribute-disallow.https.html b/testing/web-platform/tests/fenced-frame/default-enabled-features-attribute-disallow.https.html new file mode 100644 index 0000000000..f9ef9b6db2 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/default-enabled-features-attribute-disallow.https.html @@ -0,0 +1,33 @@ + +Test default permission policy features with allow="" attribute + + + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/default-enabled-features-attribution-disabled.https.html b/testing/web-platform/tests/fenced-frame/default-enabled-features-attribution-disabled.https.html new file mode 100644 index 0000000000..9e037e24a3 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/default-enabled-features-attribution-disabled.https.html @@ -0,0 +1,28 @@ + +Test where attribution-reporting is disabled in the top-level page + + + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/default-enabled-features-attribution-disabled.https.html.headers b/testing/web-platform/tests/fenced-frame/default-enabled-features-attribution-disabled.https.html.headers new file mode 100644 index 0000000000..af6d6ecb2e --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/default-enabled-features-attribution-disabled.https.html.headers @@ -0,0 +1 @@ +Permissions-Policy: attribution-reporting=() \ No newline at end of file diff --git a/testing/web-platform/tests/fenced-frame/default-enabled-features-subframe.https.html b/testing/web-platform/tests/fenced-frame/default-enabled-features-subframe.https.html new file mode 100644 index 0000000000..a86a02b00a --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/default-enabled-features-subframe.https.html @@ -0,0 +1,43 @@ + +Test nested iframes inheriting permissions from fenced frames + + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/default-enabled-features-unset.https.html b/testing/web-platform/tests/fenced-frame/default-enabled-features-unset.https.html new file mode 100644 index 0000000000..b438d1ff35 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/default-enabled-features-unset.https.html @@ -0,0 +1,29 @@ + +Test default permission policy features gating unset + + + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/default-enabled-features-unset.https.html.headers b/testing/web-platform/tests/fenced-frame/default-enabled-features-unset.https.html.headers new file mode 100644 index 0000000000..e087474e2a --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/default-enabled-features-unset.https.html.headers @@ -0,0 +1 @@ +Permissions-Policy: geolocation=(*) \ No newline at end of file diff --git a/testing/web-platform/tests/fenced-frame/deprecated-config-apis.https.html b/testing/web-platform/tests/fenced-frame/deprecated-config-apis.https.html new file mode 100644 index 0000000000..e746336f47 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/deprecated-config-apis.https.html @@ -0,0 +1,42 @@ + +Tests for configs as arguments to `deprecatedReplaceInURN` and `deprecatedURNToURL`. + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/disable-untrusted-network.https.html b/testing/web-platform/tests/fenced-frame/disable-untrusted-network.https.html new file mode 100644 index 0000000000..726728e489 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/disable-untrusted-network.https.html @@ -0,0 +1,49 @@ + +Test window.fence.disableUntrustedNetwork availability. + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/disallowed-navigation-to-blob.https.html b/testing/web-platform/tests/fenced-frame/disallowed-navigation-to-blob.https.html new file mode 100644 index 0000000000..3722609410 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/disallowed-navigation-to-blob.https.html @@ -0,0 +1,37 @@ + +Fenced frame disallowed navigations to blob: URL + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/disallowed-navigation-to-data.https.html b/testing/web-platform/tests/fenced-frame/disallowed-navigation-to-data.https.html new file mode 100644 index 0000000000..99c2e05bee --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/disallowed-navigation-to-data.https.html @@ -0,0 +1,35 @@ + +Fenced frame disallowed navigations to data: URL + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/disallowed-navigation-to-http.https.html b/testing/web-platform/tests/fenced-frame/disallowed-navigation-to-http.https.html new file mode 100644 index 0000000000..18ed92851a --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/disallowed-navigation-to-http.https.html @@ -0,0 +1,40 @@ + +Fenced frame disallowed navigations + + + + + + + + + + + \ No newline at end of file diff --git a/testing/web-platform/tests/fenced-frame/disallowed-navigations-dangling-markup-urn.https.html b/testing/web-platform/tests/fenced-frame/disallowed-navigations-dangling-markup-urn.https.html new file mode 100644 index 0000000000..a36f98f975 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/disallowed-navigations-dangling-markup-urn.https.html @@ -0,0 +1,64 @@ + +Fenced frame disallowed navigations with potentially-dangling markup + + + + + + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/disallowed-navigations-dangling-markup.https.html b/testing/web-platform/tests/fenced-frame/disallowed-navigations-dangling-markup.https.html new file mode 100644 index 0000000000..72f0855d59 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/disallowed-navigations-dangling-markup.https.html @@ -0,0 +1,32 @@ + +Fenced frame disallowed navigations with potentially-dangling markup + + + + + + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/disallowed-navigations.https.html b/testing/web-platform/tests/fenced-frame/disallowed-navigations.https.html new file mode 100644 index 0000000000..54fa95f16f --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/disallowed-navigations.https.html @@ -0,0 +1,118 @@ + +Fenced frame disallowed navigations + + + + + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/document-activeelement.https.html b/testing/web-platform/tests/fenced-frame/document-activeelement.https.html new file mode 100644 index 0000000000..3ac1fd866f --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/document-activeelement.https.html @@ -0,0 +1,40 @@ + +Test document.activeElement + + + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/document-hasfocus.https.html b/testing/web-platform/tests/fenced-frame/document-hasfocus.https.html new file mode 100644 index 0000000000..24ea9988e9 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/document-hasfocus.https.html @@ -0,0 +1,37 @@ + +Test document.hasFocus + + + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/document-picture-in-picture-denied.https.html b/testing/web-platform/tests/fenced-frame/document-picture-in-picture-denied.https.html new file mode 100644 index 0000000000..3838fd683a --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/document-picture-in-picture-denied.https.html @@ -0,0 +1,28 @@ + +Test that fencedframes cannot open a DocumentPictureInPicture window. + + + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/document-referrer.https.html b/testing/web-platform/tests/fenced-frame/document-referrer.https.html new file mode 100644 index 0000000000..2bbc319c7b --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/document-referrer.https.html @@ -0,0 +1,60 @@ + +Test document.referrer referrer + + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/download.https.html b/testing/web-platform/tests/fenced-frame/download.https.html new file mode 100644 index 0000000000..ae9cebbe05 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/download.https.html @@ -0,0 +1,39 @@ + +Test fenced frame does not allow triggering download + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/embedder-coop-coep-blocked.https.html b/testing/web-platform/tests/fenced-frame/embedder-coop-coep-blocked.https.html new file mode 100644 index 0000000000..e0e418577d --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/embedder-coop-coep-blocked.https.html @@ -0,0 +1,21 @@ + +Test COOP/COEP properties set for a Fenced Frame Tree + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/embedder-coop-coep-blocked.https.html.headers b/testing/web-platform/tests/fenced-frame/embedder-coop-coep-blocked.https.html.headers new file mode 100644 index 0000000000..807872014a --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/embedder-coop-coep-blocked.https.html.headers @@ -0,0 +1,2 @@ +cross-origin-opener-policy:same-origin +cross-origin-embedder-policy: require-corp \ No newline at end of file diff --git a/testing/web-platform/tests/fenced-frame/embedder-csp-not-propagate.https.html b/testing/web-platform/tests/fenced-frame/embedder-csp-not-propagate.https.html new file mode 100644 index 0000000000..425cc9661e --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/embedder-csp-not-propagate.https.html @@ -0,0 +1,24 @@ + +Test embedder CSP not propagate to fenced frame + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/embedder-no-coep.https.html b/testing/web-platform/tests/fenced-frame/embedder-no-coep.https.html new file mode 100644 index 0000000000..75980a1301 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/embedder-no-coep.https.html @@ -0,0 +1,27 @@ + +Test COEP properties set for a Fenced Frame Tree + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/embedder-require-corp.https.html b/testing/web-platform/tests/fenced-frame/embedder-require-corp.https.html new file mode 100644 index 0000000000..9432d0cbb5 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/embedder-require-corp.https.html @@ -0,0 +1,39 @@ + + +Test COEP properties set for a Fenced Frame Tree + + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/embedder-require-corp.https.html.headers b/testing/web-platform/tests/fenced-frame/embedder-require-corp.https.html.headers new file mode 100644 index 0000000000..8df98474b5 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/embedder-require-corp.https.html.headers @@ -0,0 +1 @@ +cross-origin-embedder-policy: require-corp diff --git a/testing/web-platform/tests/fenced-frame/fedcm-get-credential.https.html b/testing/web-platform/tests/fenced-frame/fedcm-get-credential.https.html new file mode 100644 index 0000000000..396da5946b --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/fedcm-get-credential.https.html @@ -0,0 +1,25 @@ + +Test FedCM navigator.credentials.get() + + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/fence-api.https.html b/testing/web-platform/tests/fenced-frame/fence-api.https.html new file mode 100644 index 0000000000..7d350ff75f --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/fence-api.https.html @@ -0,0 +1,29 @@ + + + + + +Test window.fence object + + + + diff --git a/testing/web-platform/tests/fenced-frame/fence-report-event-destination-url.https.html b/testing/web-platform/tests/fenced-frame/fence-report-event-destination-url.https.html new file mode 100644 index 0000000000..6c0bdd82dc --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/fence-report-event-destination-url.https.html @@ -0,0 +1,42 @@ + +Test window.fence.reportEvent destination URL. + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/fence-report-event.https.html b/testing/web-platform/tests/fenced-frame/fence-report-event.https.html new file mode 100644 index 0000000000..ce217c7763 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/fence-report-event.https.html @@ -0,0 +1,28 @@ + +Test window.fence.reportEvent + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/fence-urn-iframes.https.html b/testing/web-platform/tests/fenced-frame/fence-urn-iframes.https.html new file mode 100644 index 0000000000..cdde07329d --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/fence-urn-iframes.https.html @@ -0,0 +1,52 @@ + +Test window.fence availability in iframes. + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/fledge-container-size-mutation-observer.https.html b/testing/web-platform/tests/fenced-frame/fledge-container-size-mutation-observer.https.html new file mode 100644 index 0000000000..b6085afce3 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/fledge-container-size-mutation-observer.https.html @@ -0,0 +1,48 @@ + +Test that mutation observer doesn't break noassert container size setter. + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/fledge-container-size.https.html b/testing/web-platform/tests/fenced-frame/fledge-container-size.https.html new file mode 100644 index 0000000000..5347c841d5 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/fledge-container-size.https.html @@ -0,0 +1,102 @@ + +Test container size in FLEDGE fenced frames. + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/fragment-navigation.https.html b/testing/web-platform/tests/fenced-frame/fragment-navigation.https.html new file mode 100644 index 0000000000..1d548e35da --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/fragment-navigation.https.html @@ -0,0 +1,50 @@ + +Test that embedder-initiated fragment navigations are forced to be cross-document. + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/frame-navigation.https.html b/testing/web-platform/tests/fenced-frame/frame-navigation.https.html new file mode 100644 index 0000000000..f3464c94e9 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/frame-navigation.https.html @@ -0,0 +1,86 @@ + +Test fenced frame navigations (by a parent frame setting its src). + + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/gamepad.https.html b/testing/web-platform/tests/fenced-frame/gamepad.https.html new file mode 100644 index 0000000000..ef6b91e921 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/gamepad.https.html @@ -0,0 +1,20 @@ + +Gamepad API test + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/get-mode-in-nested-frame.https.html b/testing/web-platform/tests/fenced-frame/get-mode-in-nested-frame.https.html new file mode 100644 index 0000000000..d0888ce2e5 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/get-mode-in-nested-frame.https.html @@ -0,0 +1,33 @@ + +Test GetFencedFrameMode() on a nested nested iframe. + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/get-nested-configs.https.html b/testing/web-platform/tests/fenced-frame/get-nested-configs.https.html new file mode 100644 index 0000000000..2876e52d14 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/get-nested-configs.https.html @@ -0,0 +1,124 @@ + +window.fence.getNestedConfigs() test + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/header-referrer.https.html b/testing/web-platform/tests/fenced-frame/header-referrer.https.html new file mode 100644 index 0000000000..b6323962d8 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/header-referrer.https.html @@ -0,0 +1,55 @@ + +Test `Referer` header + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/header-secFetchDest.https.html b/testing/web-platform/tests/fenced-frame/header-secFetchDest.https.html new file mode 100644 index 0000000000..70b8c32749 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/header-secFetchDest.https.html @@ -0,0 +1,38 @@ + +Test `Sec-Fetch-Dest` header + + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/hid.https.html b/testing/web-platform/tests/fenced-frame/hid.https.html new file mode 100644 index 0000000000..762ed6715a --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/hid.https.html @@ -0,0 +1,37 @@ + +Test of Web Bluetooth API + + + + + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/history-back-and-forward-should-not-work-in-fenced-tree.https.html b/testing/web-platform/tests/fenced-frame/history-back-and-forward-should-not-work-in-fenced-tree.https.html new file mode 100644 index 0000000000..df50a1d223 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/history-back-and-forward-should-not-work-in-fenced-tree.https.html @@ -0,0 +1,68 @@ + + + + + + +history-back-and-forward-should-not-work-in-fenced-tree + + + + + diff --git a/testing/web-platform/tests/fenced-frame/history-length-fenced-navigations-replace-do-not-contribute-to-joint.https.html b/testing/web-platform/tests/fenced-frame/history-length-fenced-navigations-replace-do-not-contribute-to-joint.https.html new file mode 100644 index 0000000000..bd1d5f7309 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/history-length-fenced-navigations-replace-do-not-contribute-to-joint.https.html @@ -0,0 +1,55 @@ + +Test history.length in outermost document + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/history-length-outer-page-navigation-not-reflected-in-fenced.https.html b/testing/web-platform/tests/fenced-frame/history-length-outer-page-navigation-not-reflected-in-fenced.https.html new file mode 100644 index 0000000000..da64304031 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/history-length-outer-page-navigation-not-reflected-in-fenced.https.html @@ -0,0 +1,78 @@ + + + + + +history-length-outer-page-navigation-not-reflected-in-fenced + + + + diff --git a/testing/web-platform/tests/fenced-frame/ignore-child-fenced-frame-onload-event.https.html b/testing/web-platform/tests/fenced-frame/ignore-child-fenced-frame-onload-event.https.html new file mode 100644 index 0000000000..a542c25909 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/ignore-child-fenced-frame-onload-event.https.html @@ -0,0 +1,31 @@ + +Ignore child fenced frame onload event + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/insecure-context.html b/testing/web-platform/tests/fenced-frame/insecure-context.html new file mode 100644 index 0000000000..44db6432a4 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/insecure-context.html @@ -0,0 +1,33 @@ + +Insecure Context Test + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/intersection-observer.https.html b/testing/web-platform/tests/fenced-frame/intersection-observer.https.html new file mode 100644 index 0000000000..592e7c127f --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/intersection-observer.https.html @@ -0,0 +1,53 @@ + +Test Intersection Observer in fenced frame + + + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/invalid-url.https.html b/testing/web-platform/tests/fenced-frame/invalid-url.https.html new file mode 100644 index 0000000000..4e17185d81 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/invalid-url.https.html @@ -0,0 +1,17 @@ + +Test Navigate Fenced Frame to Invalid URL + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/key-scrolling.https.html b/testing/web-platform/tests/fenced-frame/key-scrolling.https.html new file mode 100644 index 0000000000..7a23a72cb0 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/key-scrolling.https.html @@ -0,0 +1,67 @@ + +Test keyboard scroll bubbling from a fenced frame. + + + + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/key-value-store.https.html b/testing/web-platform/tests/fenced-frame/key-value-store.https.html new file mode 100644 index 0000000000..ba6b1c0a4f --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/key-value-store.https.html @@ -0,0 +1,43 @@ + +Test the key value store + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/load-ad-with-size.https.html b/testing/web-platform/tests/fenced-frame/load-ad-with-size.https.html new file mode 100644 index 0000000000..c06205f056 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/load-ad-with-size.https.html @@ -0,0 +1,29 @@ + +Fenced frames loading a winning ad from FLEDGE auction with size + + + + + + + + + + + \ No newline at end of file diff --git a/testing/web-platform/tests/fenced-frame/loading.https.html b/testing/web-platform/tests/fenced-frame/loading.https.html new file mode 100644 index 0000000000..2f39af0395 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/loading.https.html @@ -0,0 +1,26 @@ + +Fenced frames loading tests + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/location-ancestorOrigins.https.html b/testing/web-platform/tests/fenced-frame/location-ancestorOrigins.https.html new file mode 100644 index 0000000000..f72a668bdc --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/location-ancestorOrigins.https.html @@ -0,0 +1,51 @@ + +Test location.ancestorOrigins + + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/mediaDevices-setCaptureHandle.https.html b/testing/web-platform/tests/fenced-frame/mediaDevices-setCaptureHandle.https.html new file mode 100644 index 0000000000..fcc95a401f --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/mediaDevices-setCaptureHandle.https.html @@ -0,0 +1,32 @@ + +Test MediaDevice navigator.mediaDevices.setCaptureHandleConfig() + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/multiple-component-ads.https.html b/testing/web-platform/tests/fenced-frame/multiple-component-ads.https.html new file mode 100644 index 0000000000..81d506842e --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/multiple-component-ads.https.html @@ -0,0 +1,32 @@ + +Test loading multiple component ads + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/navigate-ancestor-by-name.https.html b/testing/web-platform/tests/fenced-frame/navigate-ancestor-by-name.https.html new file mode 100644 index 0000000000..a5df1e9942 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/navigate-ancestor-by-name.https.html @@ -0,0 +1,67 @@ + +Test named frame navigation of ancestors. + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/navigate-ancestor-nested-fenced-frame.https.html b/testing/web-platform/tests/fenced-frame/navigate-ancestor-nested-fenced-frame.https.html new file mode 100644 index 0000000000..ec41fe8757 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/navigate-ancestor-nested-fenced-frame.https.html @@ -0,0 +1,20 @@ + +Test navigating an ancestor frame from a nested fenced frame + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/navigate-ancestor-nested-iframe.https.html b/testing/web-platform/tests/fenced-frame/navigate-ancestor-nested-iframe.https.html new file mode 100644 index 0000000000..977eae1748 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/navigate-ancestor-nested-iframe.https.html @@ -0,0 +1,20 @@ + +Test navigating an ancestor frame from a iframe in a fenced frame + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/navigate-ancestor-top-level-fenced-frame.https.html b/testing/web-platform/tests/fenced-frame/navigate-ancestor-top-level-fenced-frame.https.html new file mode 100644 index 0000000000..9907f25292 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/navigate-ancestor-top-level-fenced-frame.https.html @@ -0,0 +1,20 @@ + +Test navigating an ancestor frame from a fenced frame + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/navigate-by-name-succeed.https.html b/testing/web-platform/tests/fenced-frame/navigate-by-name-succeed.https.html new file mode 100644 index 0000000000..4d558f8d23 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/navigate-by-name-succeed.https.html @@ -0,0 +1,37 @@ + +Test successful named frame navigation. + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/navigate-descendant-by-name.https.html b/testing/web-platform/tests/fenced-frame/navigate-descendant-by-name.https.html new file mode 100644 index 0000000000..08ce4b99f3 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/navigate-descendant-by-name.https.html @@ -0,0 +1,90 @@ + +Test named frame navigation of descendants + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/navigate-related-page-by-name.https.html b/testing/web-platform/tests/fenced-frame/navigate-related-page-by-name.https.html new file mode 100644 index 0000000000..755f32a5a3 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/navigate-related-page-by-name.https.html @@ -0,0 +1,60 @@ + +Test named frame navigation of related pages. + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/navigator-keyboard-layout-map.https.html b/testing/web-platform/tests/fenced-frame/navigator-keyboard-layout-map.https.html new file mode 100644 index 0000000000..28cdbc848e --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/navigator-keyboard-layout-map.https.html @@ -0,0 +1,39 @@ + +Test navigator.keyboard.getLayoutMap() + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/navigator-keyboard-lock.https.html b/testing/web-platform/tests/fenced-frame/navigator-keyboard-lock.https.html new file mode 100644 index 0000000000..74092a41d2 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/navigator-keyboard-lock.https.html @@ -0,0 +1,25 @@ + +Test navigator.keyboard.lock + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/navigator-subapp.https.html b/testing/web-platform/tests/fenced-frame/navigator-subapp.https.html new file mode 100644 index 0000000000..843d256554 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/navigator-subapp.https.html @@ -0,0 +1,30 @@ + +navigator.subApp API test + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/navigator-vibrate.https.html b/testing/web-platform/tests/fenced-frame/navigator-vibrate.https.html new file mode 100644 index 0000000000..6bcabf4d47 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/navigator-vibrate.https.html @@ -0,0 +1,60 @@ + +Test that navigator.vibrate is disabled in fenced frames. + + + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/navigator-virtualkeyboard.https.html b/testing/web-platform/tests/fenced-frame/navigator-virtualkeyboard.https.html new file mode 100644 index 0000000000..4f2a17f2ff --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/navigator-virtualkeyboard.https.html @@ -0,0 +1,23 @@ + +Test navigator.virtualKeyboard.overlaysContent + + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/nested-opaque-ad-sizes.https.html b/testing/web-platform/tests/fenced-frame/nested-opaque-ad-sizes.https.html new file mode 100644 index 0000000000..aa93b962ff --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/nested-opaque-ad-sizes.https.html @@ -0,0 +1,44 @@ + +Test cases when fenced frame size shouldn't be restricted.. + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/notification.https.html b/testing/web-platform/tests/fenced-frame/notification.https.html new file mode 100644 index 0000000000..636d218e10 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/notification.https.html @@ -0,0 +1,103 @@ + +Test Notification + + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/opaque-ad-sizes-exact-size.https.html b/testing/web-platform/tests/fenced-frame/opaque-ad-sizes-exact-size.https.html new file mode 100644 index 0000000000..b23d3ab0d7 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/opaque-ad-sizes-exact-size.https.html @@ -0,0 +1,27 @@ + +Test frame size restrictions in FLEDGE. + + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/opaque-ad-sizes-special-cases.https.html b/testing/web-platform/tests/fenced-frame/opaque-ad-sizes-special-cases.https.html new file mode 100644 index 0000000000..55cadaeec0 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/opaque-ad-sizes-special-cases.https.html @@ -0,0 +1,27 @@ + +Test frame size restrictions in FLEDGE. + + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/payment-handler.https.html b/testing/web-platform/tests/fenced-frame/payment-handler.https.html new file mode 100644 index 0000000000..36e5e50726 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/payment-handler.https.html @@ -0,0 +1,60 @@ + +Test Payment Handler API + + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/payment-request.https.html b/testing/web-platform/tests/fenced-frame/payment-request.https.html new file mode 100644 index 0000000000..0d1bbb0113 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/payment-request.https.html @@ -0,0 +1,37 @@ + +Test Payment Rrequest API + + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/permission-api-denied-non-standard.https.html b/testing/web-platform/tests/fenced-frame/permission-api-denied-non-standard.https.html new file mode 100644 index 0000000000..ffc06781f6 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/permission-api-denied-non-standard.https.html @@ -0,0 +1,40 @@ + +Permission API in fenced frames should always return denied + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/permission-api-denied.https.html b/testing/web-platform/tests/fenced-frame/permission-api-denied.https.html new file mode 100644 index 0000000000..0d193e73cc --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/permission-api-denied.https.html @@ -0,0 +1,46 @@ + +Permission API in fenced frames should always return denied + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/permission-geolocation.https.html b/testing/web-platform/tests/fenced-frame/permission-geolocation.https.html new file mode 100644 index 0000000000..e9ad53511b --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/permission-geolocation.https.html @@ -0,0 +1,74 @@ + +Test permission of geolocation + + + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/permission-notification.https.html b/testing/web-platform/tests/fenced-frame/permission-notification.https.html new file mode 100644 index 0000000000..7934125294 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/permission-notification.https.html @@ -0,0 +1,28 @@ + +Test permission of notification + + + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/picture-in-picture.https.html b/testing/web-platform/tests/fenced-frame/picture-in-picture.https.html new file mode 100644 index 0000000000..9665f88b9c --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/picture-in-picture.https.html @@ -0,0 +1,31 @@ + +Test of picture-in-picture + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/popup-noopener.https.html b/testing/web-platform/tests/fenced-frame/popup-noopener.https.html new file mode 100644 index 0000000000..9e7e8ce262 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/popup-noopener.https.html @@ -0,0 +1,57 @@ + +Test popup created from a Fenced Frame Tree + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/prerender.https.html b/testing/web-platform/tests/fenced-frame/prerender.https.html new file mode 100644 index 0000000000..45a39989d2 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/prerender.https.html @@ -0,0 +1,51 @@ + +Test prerendering + + + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/presentation-receiver.https.html b/testing/web-platform/tests/fenced-frame/presentation-receiver.https.html new file mode 100644 index 0000000000..c33c72abf0 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/presentation-receiver.https.html @@ -0,0 +1,26 @@ + +Test permission of notification + + + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/reinsert.https.html b/testing/web-platform/tests/fenced-frame/reinsert.https.html new file mode 100644 index 0000000000..b88ff83d00 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/reinsert.https.html @@ -0,0 +1,32 @@ + +Test Content Security Policy + + + + + + + + + + \ No newline at end of file diff --git a/testing/web-platform/tests/fenced-frame/report-event-inactive-document.https.html b/testing/web-platform/tests/fenced-frame/report-event-inactive-document.https.html new file mode 100644 index 0000000000..cb59aad233 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/report-event-inactive-document.https.html @@ -0,0 +1,48 @@ + +Test window.fence.reportEvent + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/report-event-reserved-event.https.html b/testing/web-platform/tests/fenced-frame/report-event-reserved-event.https.html new file mode 100644 index 0000000000..0a541bb0c5 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/report-event-reserved-event.https.html @@ -0,0 +1,40 @@ + +Test window.fence.reportEvent + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/report-event-sandboxed-iframe.https.html b/testing/web-platform/tests/fenced-frame/report-event-sandboxed-iframe.https.html new file mode 100644 index 0000000000..7298f39e69 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/report-event-sandboxed-iframe.https.html @@ -0,0 +1,34 @@ + +Test that window.fence.reportEvent does not crash in sandboxed iframes + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/resize-lock-input.https.html b/testing/web-platform/tests/fenced-frame/resize-lock-input.https.html new file mode 100644 index 0000000000..c72075ac25 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resize-lock-input.https.html @@ -0,0 +1,112 @@ + + Test FencedFrames Resize Lock + + + + + + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/resize-lock-zoom.https.html b/testing/web-platform/tests/fenced-frame/resize-lock-zoom.https.html new file mode 100644 index 0000000000..783f51d84e --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resize-lock-zoom.https.html @@ -0,0 +1,39 @@ + + Test FencedFrames does not leak the CSS zoom property + + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/resize-lock.https.html b/testing/web-platform/tests/fenced-frame/resize-lock.https.html new file mode 100644 index 0000000000..b7c39f6f3a --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resize-lock.https.html @@ -0,0 +1,96 @@ + +Test cases when fenced frame size shouldn't be restricted.. + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/resolve-to-config-promise.https.html b/testing/web-platform/tests/fenced-frame/resolve-to-config-promise.https.html new file mode 100644 index 0000000000..97df37ef2b --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resolve-to-config-promise.https.html @@ -0,0 +1,80 @@ + +Test setting auction config's resolveToConfig to a promise + + + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/resources/ancestor-throttle-iframe-csp.https.html b/testing/web-platform/tests/fenced-frame/resources/ancestor-throttle-iframe-csp.https.html new file mode 100644 index 0000000000..28fadb296c --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/ancestor-throttle-iframe-csp.https.html @@ -0,0 +1,18 @@ + + + +Header Inheritance CSP Reporting Page + + + + diff --git a/testing/web-platform/tests/fenced-frame/resources/ancestor-throttle-iframe-csp.https.html.headers b/testing/web-platform/tests/fenced-frame/resources/ancestor-throttle-iframe-csp.https.html.headers new file mode 100644 index 0000000000..bb76329b1d --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/ancestor-throttle-iframe-csp.https.html.headers @@ -0,0 +1,2 @@ +Supports-Loading-Mode: fenced-frame +Content-Security-Policy: frame-ancestors 'self' diff --git a/testing/web-platform/tests/fenced-frame/resources/ancestor-throttle-iframe-xfo.https.html b/testing/web-platform/tests/fenced-frame/resources/ancestor-throttle-iframe-xfo.https.html new file mode 100644 index 0000000000..267aa076c0 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/ancestor-throttle-iframe-xfo.https.html @@ -0,0 +1,18 @@ + + + +Header Inheritance XFO Reporting Page + + + + diff --git a/testing/web-platform/tests/fenced-frame/resources/ancestor-throttle-iframe-xfo.https.html.headers b/testing/web-platform/tests/fenced-frame/resources/ancestor-throttle-iframe-xfo.https.html.headers new file mode 100644 index 0000000000..63d5019c35 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/ancestor-throttle-iframe-xfo.https.html.headers @@ -0,0 +1,2 @@ +Supports-Loading-Mode: fenced-frame +X-Frame-Options: SAMEORIGIN diff --git a/testing/web-platform/tests/fenced-frame/resources/ancestor-throttle-inner.https.html b/testing/web-platform/tests/fenced-frame/resources/ancestor-throttle-inner.https.html new file mode 100644 index 0000000000..e0977c73f0 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/ancestor-throttle-inner.https.html @@ -0,0 +1,33 @@ + + + + +Header Inheritance Inner Page + + + + diff --git a/testing/web-platform/tests/fenced-frame/resources/ancestor-throttle-inner.https.html.headers b/testing/web-platform/tests/fenced-frame/resources/ancestor-throttle-inner.https.html.headers new file mode 100644 index 0000000000..1b63235b7c --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/ancestor-throttle-inner.https.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame diff --git a/testing/web-platform/tests/fenced-frame/resources/ancestor-throttle-nested.https.html b/testing/web-platform/tests/fenced-frame/resources/ancestor-throttle-nested.https.html new file mode 100644 index 0000000000..a26b7bfdc2 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/ancestor-throttle-nested.https.html @@ -0,0 +1,22 @@ + + + +Header Inheritance CSP Reporting Page + + + + diff --git a/testing/web-platform/tests/fenced-frame/resources/ancestor-throttle-nested.https.html.headers b/testing/web-platform/tests/fenced-frame/resources/ancestor-throttle-nested.https.html.headers new file mode 100644 index 0000000000..1b63235b7c --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/ancestor-throttle-nested.https.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame diff --git a/testing/web-platform/tests/fenced-frame/resources/automatic-beacon-helper.js b/testing/web-platform/tests/fenced-frame/resources/automatic-beacon-helper.js new file mode 100644 index 0000000000..d0a4133e84 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/automatic-beacon-helper.js @@ -0,0 +1,104 @@ +// This is a helper file used for the automatic-beacon-*.https.html tests. +// To use this, make sure you import these scripts: +// +// +// +// +// +// +// +// +// + +const NavigationTrigger = { + Click: 0, + ClickOnce: 1, + CrossOriginClick: 2, + CrossOriginClickNoOptIn: 3 +}; + +// Registers an automatic beacon in a given remote context frame, and registers +// the navigation handler for the frame that will trigger the beacon. +// remote_context: The context for the fenced frame or URN iframe. +// beacon_events: An array of FenceEvents to register with the frame. +// navigation_url: The URL the frame will navigate to. +// navigation_trigger: How the navigation will be performed. Either through a +// click, a click with a `once` event, a click in a +// cross-origin subframe, or a click in a cross-origin +// subframe with no opt-in header. +// target: the target of the navigation. Either '_blank' or +// '_unfencedTop'. +async function setupAutomaticBeacon( + remote_context, beacon_events, navigation_url = 'resources/dummy.html', + navigation_trigger = NavigationTrigger.Click, target = '_blank') { + const full_url = new URL(navigation_url, location.href); + await remote_context.execute( + async ( + NavigationTrigger, beacon_events, navigation_trigger, full_url, + target) => { + switch (navigation_trigger) { + case NavigationTrigger.Click: + addEventListener('click', (event) => { + beacon_events.forEach((beacon_event) => { + window.fence.setReportEventDataForAutomaticBeacons( + beacon_event); + }); + window.open(full_url, target); + }); + break; + case NavigationTrigger.ClickOnce: + beacon_events.forEach((beacon_event) => { + window.fence.setReportEventDataForAutomaticBeacons(beacon_event); + }); + addEventListener('click', (event) => { + window.open(full_url, target); + }); + break; + case NavigationTrigger.CrossOriginClick: + case NavigationTrigger.CrossOriginClickNoOptIn: + beacon_events.forEach((beacon_event) => { + window.fence.setReportEventDataForAutomaticBeacons(beacon_event); + }); + // Add a cross-origin iframe that will perform the top-level + // navigation. Do not set the 'Allow-Fenced-Frame-Automatic-Beacons' + // header to true. + const iframe = await attachIFrameContext({ + origin: get_host_info().HTTPS_REMOTE_ORIGIN, + headers: [[ + 'Allow-Fenced-Frame-Automatic-Beacons', + navigation_trigger == NavigationTrigger.CrossOriginClick ? + 'true' : + 'false' + ]] + }); + await iframe.execute(async (full_url, target) => { + addEventListener('click', (event) => { + window.open(full_url, target); + }); + }, [full_url, target]); + break; + } + }, + [NavigationTrigger, beacon_events, navigation_trigger, full_url, target]); +} + +// Checks if an automatic beacon of type `event_type` with contents `event_data` +// was sent out or not. +// event_type: The automatic beacon type to check. +// event_data: The automatic beacon data to check. +// expected_success: Whether we expect the automatic beacon to be sent. +// t: The WPT's test object. Only required if +// expected_success = false. +async function verifyBeaconData( + event_type, event_data, expected_success = true, t) { + if (expected_success) { + const beacon_initiator_origin = + await nextAutomaticBeacon(event_type, event_data); + assert_equals(beacon_initiator_origin, get_host_info().HTTPS_ORIGIN); + } else { + const timeout = new Promise(r => t.step_timeout(r, 1000)); + const result = await Promise.race( + [nextAutomaticBeacon(event_type, event_data), timeout]); + assert_true(typeof result === 'undefined'); + } +} diff --git a/testing/web-platform/tests/fenced-frame/resources/automatic-beacon-store.py b/testing/web-platform/tests/fenced-frame/resources/automatic-beacon-store.py new file mode 100644 index 0000000000..ba1b73201b --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/automatic-beacon-store.py @@ -0,0 +1,44 @@ +""" +Automatic beacon store server. + +- When a request body is specified, stores the data in the body and serves a 200 + response without body. +- When a request body is not specified, serves a 200 response whose body + contains the stored value from the automatic beacon. Since the data is stored + using a hash of the data as the key, it expects an `expected_body` query + parameter to know what key to look up. If the stored value doesn't exist, + serves a 200 response with an empty body. +""" +import uuid +import hashlib + +NO_DATA_STRING = b"" +NOT_SET_STRING = b"" + +# The server stash requires a uuid to store data. Use a hash of the automatic +# beacon data as the uuid to store and retrieve the data. +def string_to_uuid(input): + hash_value = hashlib.md5(str(input).encode("UTF-8")).hexdigest() + return str(uuid.UUID(hex=hash_value)) + +def main(request, response): + stash = request.server.stash; + event_type = request.GET.first(b"type", NO_DATA_STRING) + + # The stash is accessed concurrently by many clients. A lock is used to + # avoid interleaved read/write from different clients. + with stash.lock: + # Requests with a body imply they were sent as an automatic beacon. Note + # that this only stores the most recent beacon that was sent. + if request.method == "POST": + request_body = request.body or NO_DATA_STRING + request_headers = request.headers.get("Origin") or NO_DATA_STRING + stash.put(string_to_uuid(event_type + request_body), + request_headers) + return (200, [], b"") + + # Requests without a body imply they were sent as the request from + # nextAutomaticBeacon(). + expected_body = request.GET.first(b"expected_body", NO_DATA_STRING) + data = stash.take(string_to_uuid(event_type + expected_body)) or NOT_SET_STRING + return(200, [], data) diff --git a/testing/web-platform/tests/fenced-frame/resources/automatic-beacon-unfenced-page.html b/testing/web-platform/tests/fenced-frame/resources/automatic-beacon-unfenced-page.html new file mode 100644 index 0000000000..4ce7e0d78a --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/automatic-beacon-unfenced-page.html @@ -0,0 +1,21 @@ + +Page navigated to by an _unfencedTop navigation + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/resources/background-fetch-inner.https.html b/testing/web-platform/tests/fenced-frame/resources/background-fetch-inner.https.html new file mode 100644 index 0000000000..1bca25a957 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/background-fetch-inner.https.html @@ -0,0 +1,47 @@ + + + + +Fenced frame content to report the result of background fetch + + + + diff --git a/testing/web-platform/tests/fenced-frame/resources/background-fetch-inner.https.html.headers b/testing/web-platform/tests/fenced-frame/resources/background-fetch-inner.https.html.headers new file mode 100644 index 0000000000..6247f6d632 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/background-fetch-inner.https.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame \ No newline at end of file diff --git a/testing/web-platform/tests/fenced-frame/resources/background-fetch-sw-inner.https.html b/testing/web-platform/tests/fenced-frame/resources/background-fetch-sw-inner.https.html new file mode 100644 index 0000000000..78e58e5bbf --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/background-fetch-sw-inner.https.html @@ -0,0 +1,38 @@ + + + + +Fenced frame content to report the result of background fetch in SW + + + + diff --git a/testing/web-platform/tests/fenced-frame/resources/background-fetch-sw-inner.https.html.headers b/testing/web-platform/tests/fenced-frame/resources/background-fetch-sw-inner.https.html.headers new file mode 100644 index 0000000000..1b63235b7c --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/background-fetch-sw-inner.https.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame diff --git a/testing/web-platform/tests/fenced-frame/resources/background-fetch-sw.js b/testing/web-platform/tests/fenced-frame/resources/background-fetch-sw.js new file mode 100644 index 0000000000..44b7d087b5 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/background-fetch-sw.js @@ -0,0 +1,36 @@ +self.addEventListener('install', e => e.waitUntil(skipWaiting())); +self.addEventListener('activate', e => e.waitUntil(clients.claim())); + +self.addEventListener('message', async e => { + const method = e.data; + + let promise; + switch (method) { + case 'fetch': + promise = self.registration.backgroundFetch.fetch( + 'test-fetch', ['background-fetch-inner.https.html.headers'], + {title: 'Background Fetch'}); + break; + case 'get': + promise = self.registration.backgroundFetch.get('test-fetch') + break; + case 'getIds': + promise = registration.backgroundFetch.getIds(); + break; + default: + promise = Promise.resolve(); + break; + } + + const message = + await promise + .then(() => { + return `[backgroundFetch.${method}] Unexpectedly started`; + }) + .catch((e) => { + return `[backgroundFetch.${ + method}] Failed inside fencedframe as expected`; + }); + + e.source.postMessage(message); +}); diff --git a/testing/web-platform/tests/fenced-frame/resources/background-sync-helper.js b/testing/web-platform/tests/fenced-frame/resources/background-sync-helper.js new file mode 100644 index 0000000000..78b69f15de --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/background-sync-helper.js @@ -0,0 +1,23 @@ +const getOneShotSyncPromise = (registration, method) => { + if (method === 'register') { + return registration.sync.register('fencedframe-oneshot'); + } else if (method === 'getTags') { + return registration.sync.getTags(); + } + return Promise.resolve(); +}; + +const getPeriodicSyncPromise = (registration, method) => { + if (method === 'register') { + return registration.periodicSync.register( + 'fencedframe-periodic', {minInterval: 1000}); + } else if (method === 'getTags') { + return registration.periodicSync.getTags(); + } else if (method === 'unregister') { + return registration.periodicSync.unregister('fencedframe-periodic'); + } else { + return Promise.resolve(); + } +}; + +export {getOneShotSyncPromise, getPeriodicSyncPromise} diff --git a/testing/web-platform/tests/fenced-frame/resources/background-sync-inner.https.html b/testing/web-platform/tests/fenced-frame/resources/background-sync-inner.https.html new file mode 100644 index 0000000000..81974c803a --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/background-sync-inner.https.html @@ -0,0 +1,32 @@ + + + + +Fenced frame content to report the result of background sync's register + + + + diff --git a/testing/web-platform/tests/fenced-frame/resources/background-sync-inner.https.html.headers b/testing/web-platform/tests/fenced-frame/resources/background-sync-inner.https.html.headers new file mode 100644 index 0000000000..6247f6d632 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/background-sync-inner.https.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame \ No newline at end of file diff --git a/testing/web-platform/tests/fenced-frame/resources/background-sync-sw-inner.https.html b/testing/web-platform/tests/fenced-frame/resources/background-sync-sw-inner.https.html new file mode 100644 index 0000000000..b9521a4e20 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/background-sync-sw-inner.https.html @@ -0,0 +1,41 @@ + + + + +Fenced frame content to report the result of background sync's register in SW + + + + diff --git a/testing/web-platform/tests/fenced-frame/resources/background-sync-sw-inner.https.html.headers b/testing/web-platform/tests/fenced-frame/resources/background-sync-sw-inner.https.html.headers new file mode 100644 index 0000000000..6247f6d632 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/background-sync-sw-inner.https.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame \ No newline at end of file diff --git a/testing/web-platform/tests/fenced-frame/resources/background-sync-sw.js b/testing/web-platform/tests/fenced-frame/resources/background-sync-sw.js new file mode 100644 index 0000000000..5b0c791f0d --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/background-sync-sw.js @@ -0,0 +1,21 @@ +import {getOneShotSyncPromise, getPeriodicSyncPromise} from './background-sync-helper.js'; + +self.addEventListener('install', e => e.waitUntil(skipWaiting())); +self.addEventListener('activate', e => e.waitUntil(clients.claim())); + +self.addEventListener('message', async e => { + const {method, isPeriodic} = e.data; + const promise = isPeriodic ? + getPeriodicSyncPromise(self.registration, method) : + getOneShotSyncPromise(self.registration, method); + const message = + await promise + .then(() => { + return `[background synnc ${method}] Unexpectedly started`; + }) + .catch((e) => { + return e.message; + }); + + e.source.postMessage(message); +}); diff --git a/testing/web-platform/tests/fenced-frame/resources/badging-sw.js b/testing/web-platform/tests/fenced-frame/resources/badging-sw.js new file mode 100644 index 0000000000..5bc3c9a190 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/badging-sw.js @@ -0,0 +1,23 @@ +self.addEventListener('install', e => e.waitUntil(skipWaiting())); +self.addEventListener('activate', e => e.waitUntil(clients.claim())); + +self.addEventListener('message', async e => { + const method = e.data; + + let promise; + if (method === 'setAppBadge') { + promise = self.navigator.setAppBadge(1); + } else if (method === 'clearAppBadge') { + promise = self.navigator.clearAppBadge(); + } else { + promise = Promise.resolve(); + } + + const error = await promise + .then(() => { + return `[Badging API ${method}] Unexpectedly started`; + }) + .catch((e) => e); + + e.source.postMessage(error); +}); diff --git a/testing/web-platform/tests/fenced-frame/resources/before-unload-inner.html b/testing/web-platform/tests/fenced-frame/resources/before-unload-inner.html new file mode 100644 index 0000000000..6d23cf88a3 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/before-unload-inner.html @@ -0,0 +1,27 @@ + + +Fenced frame content to report the beforeunload event is not fired + + + + diff --git a/testing/web-platform/tests/fenced-frame/resources/before-unload-inner.html.headers b/testing/web-platform/tests/fenced-frame/resources/before-unload-inner.html.headers new file mode 100644 index 0000000000..6247f6d632 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/before-unload-inner.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame \ No newline at end of file diff --git a/testing/web-platform/tests/fenced-frame/resources/check-header-referrer.py b/testing/web-platform/tests/fenced-frame/resources/check-header-referrer.py new file mode 100644 index 0000000000..b06fbc2704 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/check-header-referrer.py @@ -0,0 +1,16 @@ +import os + +from wptserve.utils import isomorphic_decode + + +def main(request, response): + response.headers.set(b"supports-loading-mode", b"fenced-frame") + + script = u""" + + + """ % (isomorphic_decode(request.headers.get(b"referer", b""))) + return (200, [], script) diff --git a/testing/web-platform/tests/fenced-frame/resources/check-header-sec-fetch-dest.py b/testing/web-platform/tests/fenced-frame/resources/check-header-sec-fetch-dest.py new file mode 100644 index 0000000000..98231079b3 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/check-header-sec-fetch-dest.py @@ -0,0 +1,14 @@ +import os + + +def main(request, response): + response.headers.set(b"supports-loading-mode", b"fenced-frame") + + script = u""" + + + """ % (request.headers.get(b"sec-fetch-dest", b"none")) + return (200, [], script) diff --git a/testing/web-platform/tests/fenced-frame/resources/client-hints-iframe-inner.sub.https.html b/testing/web-platform/tests/fenced-frame/resources/client-hints-iframe-inner.sub.https.html new file mode 100644 index 0000000000..d02abd6957 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/client-hints-iframe-inner.sub.https.html @@ -0,0 +1,11 @@ + +Client Hint Echoing Iframe + + + diff --git a/testing/web-platform/tests/fenced-frame/resources/client-hints-iframe-inner.sub.https.html.headers b/testing/web-platform/tests/fenced-frame/resources/client-hints-iframe-inner.sub.https.html.headers new file mode 100644 index 0000000000..f500a60ae8 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/client-hints-iframe-inner.sub.https.html.headers @@ -0,0 +1,4 @@ +Supports-Loading-Mode: fenced-frame +Accept-CH: sec-ch-viewport-width, sec-ch-ua-reduced +Feature-Policy: ch-viewport-width *, ch-ua-reduced * +Access-Control-Allow-Origin: * diff --git a/testing/web-platform/tests/fenced-frame/resources/client-hints-inner.sub.https.html b/testing/web-platform/tests/fenced-frame/resources/client-hints-inner.sub.https.html new file mode 100644 index 0000000000..0271d0290d --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/client-hints-inner.sub.https.html @@ -0,0 +1,27 @@ + + + +Client Hints Helper + + + diff --git a/testing/web-platform/tests/fenced-frame/resources/client-hints-inner.sub.https.html.headers b/testing/web-platform/tests/fenced-frame/resources/client-hints-inner.sub.https.html.headers new file mode 100644 index 0000000000..ea4cf59d16 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/client-hints-inner.sub.https.html.headers @@ -0,0 +1,5 @@ +Supports-Loading-Mode: fenced-frame +Accept-CH: sec-ch-viewport-width, sec-ch-ua-reduced +Feature-Policy: ch-viewport-width *, ch-ua-reduced * +Access-Control-Allow-Origin: * + diff --git a/testing/web-platform/tests/fenced-frame/resources/client-hints-meta-iframe-inner.sub.https.html b/testing/web-platform/tests/fenced-frame/resources/client-hints-meta-iframe-inner.sub.https.html new file mode 100644 index 0000000000..9afb5c6a85 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/client-hints-meta-iframe-inner.sub.https.html @@ -0,0 +1,15 @@ + + + +Client Hint Echoing Iframe + + + diff --git a/testing/web-platform/tests/fenced-frame/resources/client-hints-meta-iframe-inner.sub.https.html.headers b/testing/web-platform/tests/fenced-frame/resources/client-hints-meta-iframe-inner.sub.https.html.headers new file mode 100644 index 0000000000..b7952e5d05 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/client-hints-meta-iframe-inner.sub.https.html.headers @@ -0,0 +1,2 @@ + +Supports-Loading-Mode: fenced-frame diff --git a/testing/web-platform/tests/fenced-frame/resources/client-hints-meta-inner.sub.https.html b/testing/web-platform/tests/fenced-frame/resources/client-hints-meta-inner.sub.https.html new file mode 100644 index 0000000000..b84f16ffd0 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/client-hints-meta-inner.sub.https.html @@ -0,0 +1,31 @@ + + + + + +Client Hints Helper + + + diff --git a/testing/web-platform/tests/fenced-frame/resources/client-hints-meta-inner.sub.https.html.headers b/testing/web-platform/tests/fenced-frame/resources/client-hints-meta-inner.sub.https.html.headers new file mode 100644 index 0000000000..afe7b4f317 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/client-hints-meta-inner.sub.https.html.headers @@ -0,0 +1,2 @@ +Supports-Loading-Mode: fenced-frame +Access-Control-Allow-Origin: * diff --git a/testing/web-platform/tests/fenced-frame/resources/close.html b/testing/web-platform/tests/fenced-frame/resources/close.html new file mode 100644 index 0000000000..7fd946d6ff --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/close.html @@ -0,0 +1,5 @@ + +This window will close when it loads + \ No newline at end of file diff --git a/testing/web-platform/tests/fenced-frame/resources/config-cross-origin-apis-inner.https.html b/testing/web-platform/tests/fenced-frame/resources/config-cross-origin-apis-inner.https.html new file mode 100644 index 0000000000..211fe216c7 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/config-cross-origin-apis-inner.https.html @@ -0,0 +1,37 @@ + + + +Fenced frame attribution reporting self navigation test + + + + diff --git a/testing/web-platform/tests/fenced-frame/resources/config-cross-origin-apis-inner.https.html.headers b/testing/web-platform/tests/fenced-frame/resources/config-cross-origin-apis-inner.https.html.headers new file mode 100644 index 0000000000..1b63235b7c --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/config-cross-origin-apis-inner.https.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame diff --git a/testing/web-platform/tests/fenced-frame/resources/config-cross-origin-iframe.https.html b/testing/web-platform/tests/fenced-frame/resources/config-cross-origin-iframe.https.html new file mode 100644 index 0000000000..17c8347720 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/config-cross-origin-iframe.https.html @@ -0,0 +1,30 @@ + + + +Fenced frame attribution reporting self navigation test + + + + diff --git a/testing/web-platform/tests/fenced-frame/resources/config-cross-origin-iframe.https.html.headers b/testing/web-platform/tests/fenced-frame/resources/config-cross-origin-iframe.https.html.headers new file mode 100644 index 0000000000..1b63235b7c --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/config-cross-origin-iframe.https.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame diff --git a/testing/web-platform/tests/fenced-frame/resources/config-embed-cross-origin-iframe.https.html b/testing/web-platform/tests/fenced-frame/resources/config-embed-cross-origin-iframe.https.html new file mode 100644 index 0000000000..f21afee011 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/config-embed-cross-origin-iframe.https.html @@ -0,0 +1,18 @@ + + + +Fenced frame attribution reporting self navigation test + + + + diff --git a/testing/web-platform/tests/fenced-frame/resources/config-embed-cross-origin-iframe.https.html.headers b/testing/web-platform/tests/fenced-frame/resources/config-embed-cross-origin-iframe.https.html.headers new file mode 100644 index 0000000000..1b63235b7c --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/config-embed-cross-origin-iframe.https.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame diff --git a/testing/web-platform/tests/fenced-frame/resources/content-index-sw.js b/testing/web-platform/tests/fenced-frame/resources/content-index-sw.js new file mode 100644 index 0000000000..c2759d9630 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/content-index-sw.js @@ -0,0 +1,28 @@ +self.addEventListener('install', e => e.waitUntil(skipWaiting())); +self.addEventListener('activate', e => e.waitUntil(clients.claim())); + +self.addEventListener('message', async event => { + const method = event.data; + const {index} = self.registration; + const id = 'fenced-frame-id-sw'; + + let promise; + if (method === 'add') { + promise = index.add({ + id, + title: 'same title', + description: 'same description', + url: 'resources/' + }); + } else if (method === 'delete') { + promise = index.delete(id); + } else if (method === 'getAll') { + promise = index.getAll(); + } else { + promise = Promise.resolve(); + } + + const message = await promise.then(() => 'success').catch(e => e.message); + + event.source.postMessage(message); +}); diff --git a/testing/web-platform/tests/fenced-frame/resources/cookie-access.https.html b/testing/web-platform/tests/fenced-frame/resources/cookie-access.https.html new file mode 100644 index 0000000000..34e5681139 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/cookie-access.https.html @@ -0,0 +1,11 @@ + + +Page loaded in a frame in a fenced frame tree + diff --git a/testing/web-platform/tests/fenced-frame/resources/cookie-access.https.html.headers b/testing/web-platform/tests/fenced-frame/resources/cookie-access.https.html.headers new file mode 100644 index 0000000000..1b63235b7c --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/cookie-access.https.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame diff --git a/testing/web-platform/tests/fenced-frame/resources/create-credential-inner.https.html b/testing/web-platform/tests/fenced-frame/resources/create-credential-inner.https.html new file mode 100644 index 0000000000..5725177f21 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/create-credential-inner.https.html @@ -0,0 +1,38 @@ + + + + + + + +Fenced frame content to report the result of navigator.credentials.create + + + + diff --git a/testing/web-platform/tests/fenced-frame/resources/create-credential-inner.https.html.headers b/testing/web-platform/tests/fenced-frame/resources/create-credential-inner.https.html.headers new file mode 100644 index 0000000000..6247f6d632 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/create-credential-inner.https.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame \ No newline at end of file diff --git a/testing/web-platform/tests/fenced-frame/resources/create-popup.html b/testing/web-platform/tests/fenced-frame/resources/create-popup.html new file mode 100644 index 0000000000..a6cd81ec14 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/create-popup.html @@ -0,0 +1,18 @@ + + +Nested frames in a Fenced Frame tree creating popups + diff --git a/testing/web-platform/tests/fenced-frame/resources/create-popup.html.headers b/testing/web-platform/tests/fenced-frame/resources/create-popup.html.headers new file mode 100644 index 0000000000..1b63235b7c --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/create-popup.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame diff --git a/testing/web-platform/tests/fenced-frame/resources/csp-fenced-frame-src-allowed-inner.html b/testing/web-platform/tests/fenced-frame/resources/csp-fenced-frame-src-allowed-inner.html new file mode 100644 index 0000000000..bdb448c347 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/csp-fenced-frame-src-allowed-inner.html @@ -0,0 +1,7 @@ + + +Page embedded as a fenced frame + \ No newline at end of file diff --git a/testing/web-platform/tests/fenced-frame/resources/csp-fenced-frame-src-allowed-inner.html.headers b/testing/web-platform/tests/fenced-frame/resources/csp-fenced-frame-src-allowed-inner.html.headers new file mode 100644 index 0000000000..6247f6d632 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/csp-fenced-frame-src-allowed-inner.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame \ No newline at end of file diff --git a/testing/web-platform/tests/fenced-frame/resources/csp-fenced-frame-src-blocked-inner.html b/testing/web-platform/tests/fenced-frame/resources/csp-fenced-frame-src-blocked-inner.html new file mode 100644 index 0000000000..990f5ee469 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/csp-fenced-frame-src-blocked-inner.html @@ -0,0 +1,10 @@ + + +Page embedded as a fenced frame + \ No newline at end of file diff --git a/testing/web-platform/tests/fenced-frame/resources/csp-fenced-frame-src-blocked-inner.html.headers b/testing/web-platform/tests/fenced-frame/resources/csp-fenced-frame-src-blocked-inner.html.headers new file mode 100644 index 0000000000..6247f6d632 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/csp-fenced-frame-src-blocked-inner.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame \ No newline at end of file diff --git a/testing/web-platform/tests/fenced-frame/resources/csp-frame-src-allowed-inner.html b/testing/web-platform/tests/fenced-frame/resources/csp-frame-src-allowed-inner.html new file mode 100644 index 0000000000..bdb448c347 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/csp-frame-src-allowed-inner.html @@ -0,0 +1,7 @@ + + +Page embedded as a fenced frame + \ No newline at end of file diff --git a/testing/web-platform/tests/fenced-frame/resources/csp-frame-src-allowed-inner.html.headers b/testing/web-platform/tests/fenced-frame/resources/csp-frame-src-allowed-inner.html.headers new file mode 100644 index 0000000000..6247f6d632 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/csp-frame-src-allowed-inner.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame \ No newline at end of file diff --git a/testing/web-platform/tests/fenced-frame/resources/csp-frame-src-blocked-inner.html b/testing/web-platform/tests/fenced-frame/resources/csp-frame-src-blocked-inner.html new file mode 100644 index 0000000000..eb90bb94e9 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/csp-frame-src-blocked-inner.html @@ -0,0 +1,9 @@ + + +Page embedded as a fenced frame + \ No newline at end of file diff --git a/testing/web-platform/tests/fenced-frame/resources/csp-frame-src-blocked-inner.html.headers b/testing/web-platform/tests/fenced-frame/resources/csp-frame-src-blocked-inner.html.headers new file mode 100644 index 0000000000..6247f6d632 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/csp-frame-src-blocked-inner.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame \ No newline at end of file diff --git a/testing/web-platform/tests/fenced-frame/resources/csp-inner.html b/testing/web-platform/tests/fenced-frame/resources/csp-inner.html new file mode 100644 index 0000000000..99df39fdc5 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/csp-inner.html @@ -0,0 +1,37 @@ + + + + + + Fenced frame content to test Content Security Policies + + + + + + \ No newline at end of file diff --git a/testing/web-platform/tests/fenced-frame/resources/csp-inner.html.headers b/testing/web-platform/tests/fenced-frame/resources/csp-inner.html.headers new file mode 100644 index 0000000000..e89be70a43 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/csp-inner.html.headers @@ -0,0 +1,2 @@ +Supports-Loading-Mode: fenced-frame +Content-Security-Policy: img-src 'none' \ No newline at end of file diff --git a/testing/web-platform/tests/fenced-frame/resources/csp.png b/testing/web-platform/tests/fenced-frame/resources/csp.png new file mode 100644 index 0000000000..53a9748ae0 Binary files /dev/null and b/testing/web-platform/tests/fenced-frame/resources/csp.png differ diff --git a/testing/web-platform/tests/fenced-frame/resources/dangling-markup-helper.js b/testing/web-platform/tests/fenced-frame/resources/dangling-markup-helper.js new file mode 100644 index 0000000000..9e0fff2301 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/dangling-markup-helper.js @@ -0,0 +1,15 @@ +// These are used in tests that rely on URLs containing dangling markup. See +// https://github.com/whatwg/fetch/pull/519. +const kDanglingMarkupSubstrings = [ + "blo\nck + t.step_timeout(() => resolve("NOT LOADED"), 1500)); +} \ No newline at end of file diff --git a/testing/web-platform/tests/fenced-frame/resources/default-enabled-features-helper.js b/testing/web-platform/tests/fenced-frame/resources/default-enabled-features-helper.js new file mode 100644 index 0000000000..5b4c292622 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/default-enabled-features-helper.js @@ -0,0 +1,53 @@ +// This is a helper file used for the attribution-reporting-*.https.html tests. +// To use this, make sure you import these scripts: +// +// +// +// +// +// + +async function runDefaultEnabledFeaturesTest(t, should_load, fenced_origin, + generator_api="fledge", allow="") { + const fencedframe = await attachFencedFrameContext({ + generator_api: generator_api, + attributes: [["allow", allow]], + origin: fenced_origin}); + + if (!should_load) { + const fencedframe_blocked = new Promise(r => t.step_timeout(r, 1000)); + const fencedframe_loaded = fencedframe.execute(() => {}); + assert_equals(await Promise.any([ + fencedframe_blocked.then(() => "blocked"), + fencedframe_loaded.then(() => "loaded"), + ]), "blocked", "The fenced frame should not be loaded."); + return; + } + + await fencedframe.execute((generator_api) => { + assert_true( + document.featurePolicy.allowsFeature('attribution-reporting'), + "Attribution reporting should be allowed if the fenced " + + "frame loaded using FLEDGE or shared storage."); + + if (generator_api == "fledge") { + assert_true( + document.featurePolicy.allowsFeature('shared-storage'), + "Shared Storage should be allowed if the fenced " + + "frame loaded using FLEDGE."); + assert_true( + document.featurePolicy.allowsFeature('private-aggregation'), + "Private Aggregation should be allowed if the fenced " + + "frame loaded using FLEDGE."); + } else { + assert_true( + document.featurePolicy.allowsFeature('shared-storage'), + "Shared Storage should be allowed if the fenced " + + "frame loaded using Shared Storage."); + assert_false( + document.featurePolicy.allowsFeature('private-aggregation'), + "Private Aggregation should be disabled if the fenced " + + "frame loaded using Shared Storage."); + } + }, [generator_api]); +} diff --git a/testing/web-platform/tests/fenced-frame/resources/default-enabled-features-navigate.https.html b/testing/web-platform/tests/fenced-frame/resources/default-enabled-features-navigate.https.html new file mode 100644 index 0000000000..6bfb033400 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/default-enabled-features-navigate.https.html @@ -0,0 +1,25 @@ + + + +Fenced frame attribution reporting self navigation test + + + + diff --git a/testing/web-platform/tests/fenced-frame/resources/default-enabled-features-navigate.https.html.headers b/testing/web-platform/tests/fenced-frame/resources/default-enabled-features-navigate.https.html.headers new file mode 100644 index 0000000000..1b63235b7c --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/default-enabled-features-navigate.https.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame diff --git a/testing/web-platform/tests/fenced-frame/resources/default-enabled-features-subframe-fencedframe.https.html b/testing/web-platform/tests/fenced-frame/resources/default-enabled-features-subframe-fencedframe.https.html new file mode 100644 index 0000000000..e098736528 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/default-enabled-features-subframe-fencedframe.https.html @@ -0,0 +1,21 @@ + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/resources/default-enabled-features-subframe-fencedframe.https.html.headers b/testing/web-platform/tests/fenced-frame/resources/default-enabled-features-subframe-fencedframe.https.html.headers new file mode 100644 index 0000000000..e52511f18a --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/default-enabled-features-subframe-fencedframe.https.html.headers @@ -0,0 +1,2 @@ +Supports-Loading-Mode: fenced-frame +Permissions-Policy: shared-storage=() diff --git a/testing/web-platform/tests/fenced-frame/resources/default-enabled-features-subframe-iframe.https.html b/testing/web-platform/tests/fenced-frame/resources/default-enabled-features-subframe-iframe.https.html new file mode 100644 index 0000000000..a3ab056944 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/default-enabled-features-subframe-iframe.https.html @@ -0,0 +1,19 @@ + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/resources/default-enabled-features-subframe-iframe.https.html.headers b/testing/web-platform/tests/fenced-frame/resources/default-enabled-features-subframe-iframe.https.html.headers new file mode 100644 index 0000000000..6247f6d632 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/default-enabled-features-subframe-iframe.https.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame \ No newline at end of file diff --git a/testing/web-platform/tests/fenced-frame/resources/download-helper.js b/testing/web-platform/tests/fenced-frame/resources/download-helper.js new file mode 100644 index 0000000000..011d5c867f --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/download-helper.js @@ -0,0 +1,29 @@ +function StreamDownloadFinishDelay() { + return 1000; +} + +function DownloadVerifyDelay() { + return 1000; +} + +async function VerifyDownload(test_obj, token) { + const verifyToken = async (token) => { + const url = `resources/download-stash.py?verify-token&token=${token}`; + const response = await fetch(url); + if (!response.ok) { + throw new Error('An error happened in the server'); + } + const message = await response.text(); + return message === 'TOKEN_SET'; + }; + + return new Promise((resolve) => { + test_obj.step_wait( + async () => { + const result = await verifyToken(token); + resolve(result); + }, + 'Check if the download has finished or not', + StreamDownloadFinishDelay() + DownloadVerifyDelay()); + }); +} diff --git a/testing/web-platform/tests/fenced-frame/resources/download-inner.html b/testing/web-platform/tests/fenced-frame/resources/download-inner.html new file mode 100644 index 0000000000..9bc816cbf3 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/download-inner.html @@ -0,0 +1,34 @@ + + + + + The page triggering download embedded as a Fenced Frame + + + + + + + + + Download + + + diff --git a/testing/web-platform/tests/fenced-frame/resources/download-inner.html.headers b/testing/web-platform/tests/fenced-frame/resources/download-inner.html.headers new file mode 100644 index 0000000000..6247f6d632 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/download-inner.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame \ No newline at end of file diff --git a/testing/web-platform/tests/fenced-frame/resources/download-stash.py b/testing/web-platform/tests/fenced-frame/resources/download-stash.py new file mode 100644 index 0000000000..497f7cb018 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/download-stash.py @@ -0,0 +1,28 @@ +import time + + +def main(request, response): + token = request.GET[b"token"] + response.status = 200 + response.headers.append(b"Content-Type", b"text/html") + if b"verify-token" in request.GET: + if request.server.stash.take(token): + return u'TOKEN_SET' + return u'TOKEN_NOT_SET' + + if b"finish-delay" not in request.GET: + # + request.server.stash.put(token, True) + return + + # navigation to download + response.headers.append(b"Content-Disposition", b"attachment") + response.write_status_headers() + finish_delay = float(request.GET[b"finish-delay"]) / 1E3 + count = 10 + single_delay = finish_delay / count + for i in range(count): # pylint: disable=unused-variable + time.sleep(single_delay) + if not response.writer.write_content(b"\n"): + return + request.server.stash.put(token, True) diff --git a/testing/web-platform/tests/fenced-frame/resources/dummy.html b/testing/web-platform/tests/fenced-frame/resources/dummy.html new file mode 100644 index 0000000000..a0cf50713e --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/dummy.html @@ -0,0 +1,2 @@ + +Dummy page diff --git a/testing/web-platform/tests/fenced-frame/resources/embeddee.html b/testing/web-platform/tests/fenced-frame/resources/embeddee.html new file mode 100644 index 0000000000..3423be9aa4 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/embeddee.html @@ -0,0 +1,7 @@ + + +A page embedded as a Fenced Frame for COEP tests + diff --git a/testing/web-platform/tests/fenced-frame/resources/embeddee.html.headers b/testing/web-platform/tests/fenced-frame/resources/embeddee.html.headers new file mode 100644 index 0000000000..6247f6d632 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/embeddee.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame \ No newline at end of file diff --git a/testing/web-platform/tests/fenced-frame/resources/embedder-policy.js b/testing/web-platform/tests/fenced-frame/resources/embedder-policy.js new file mode 100644 index 0000000000..8c96afafce --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/embedder-policy.js @@ -0,0 +1,39 @@ +// This file should be loaded alongside with utils.js. +// +// This file is loaded by: +// - embedder-no-coep.https.html +// - embedder-require-corp.https.html + +// Make input list to be used as a wptserve pipe +// (https://web-platform-tests.org/writing-tests/server-pipes.html). +// e.g. +// args: ['content-type,text/plain','Age,0'] +// return: 'header(content-type,text/plain)|header(Age,0)' +function generateHeader(headers) { + return headers.map((h) => { + return 'header(' + h + ')'; + }).join('|'); +} + +// Setup a fenced frame for embedder-* WPTs. +async function setupTest(test_type, uuid, hostname='') { + let headers = ["Supports-Loading-Mode,fenced-frame"]; + switch (test_type) { + case "coep:require-corp": + headers.push("cross-origin-embedder-policy,require-corp"); + headers.push("cross-origin-resource-policy,same-origin"); + break; + case "no coep": + break; + default: + assert_unreachable("unknown test_type:" + test_type); + break; + } + const tmp_url = new URL('resources/embeddee.html', location.href); + if (hostname) { + tmp_url.hostname = hostname; + } + tmp_url.searchParams.append("pipe", generateHeader(headers)); + const url = generateURL(tmp_url.toString(), [uuid]); + return attachFencedFrame(url); +} diff --git a/testing/web-platform/tests/fenced-frame/resources/empty-worker.js b/testing/web-platform/tests/fenced-frame/resources/empty-worker.js new file mode 100644 index 0000000000..49ceb2648a --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/empty-worker.js @@ -0,0 +1 @@ +// Do nothing. diff --git a/testing/web-platform/tests/fenced-frame/resources/fedcm-get-credential-inner.https.html b/testing/web-platform/tests/fenced-frame/resources/fedcm-get-credential-inner.https.html new file mode 100644 index 0000000000..f30cd77838 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/fedcm-get-credential-inner.https.html @@ -0,0 +1,45 @@ + + + + + +Fenced frame content to report the result of navigator.credentials.get + + + + diff --git a/testing/web-platform/tests/fenced-frame/resources/fedcm-get-credential-inner.https.html.headers b/testing/web-platform/tests/fenced-frame/resources/fedcm-get-credential-inner.https.html.headers new file mode 100644 index 0000000000..6247f6d632 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/fedcm-get-credential-inner.https.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame \ No newline at end of file diff --git a/testing/web-platform/tests/fenced-frame/resources/fence-api-inner.https.html b/testing/web-platform/tests/fenced-frame/resources/fence-api-inner.https.html new file mode 100644 index 0000000000..814ea78559 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/fence-api-inner.https.html @@ -0,0 +1,22 @@ + + + +Fenced frame content to test window.fence object + + + + diff --git a/testing/web-platform/tests/fenced-frame/resources/fence-api-inner.https.html.headers b/testing/web-platform/tests/fenced-frame/resources/fence-api-inner.https.html.headers new file mode 100644 index 0000000000..6247f6d632 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/fence-api-inner.https.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame \ No newline at end of file diff --git a/testing/web-platform/tests/fenced-frame/resources/fenced-frame-loaded.html b/testing/web-platform/tests/fenced-frame/resources/fenced-frame-loaded.html new file mode 100644 index 0000000000..0054762783 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/fenced-frame-loaded.html @@ -0,0 +1,13 @@ + + + +Fenced frame loaded + + + + diff --git a/testing/web-platform/tests/fenced-frame/resources/fenced-frame-loaded.html.headers b/testing/web-platform/tests/fenced-frame/resources/fenced-frame-loaded.html.headers new file mode 100644 index 0000000000..1b63235b7c --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/fenced-frame-loaded.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame diff --git a/testing/web-platform/tests/fenced-frame/resources/fenced-frame-set-name-and-report-ready-for-outermost-document-to-navigate.html b/testing/web-platform/tests/fenced-frame/resources/fenced-frame-set-name-and-report-ready-for-outermost-document-to-navigate.html new file mode 100644 index 0000000000..9b67be775e --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/fenced-frame-set-name-and-report-ready-for-outermost-document-to-navigate.html @@ -0,0 +1,16 @@ + + +Nested fenced frame named navigation helper + + + + diff --git a/testing/web-platform/tests/fenced-frame/resources/fenced-frame-set-name-and-report-ready-for-outermost-document-to-navigate.html.headers b/testing/web-platform/tests/fenced-frame/resources/fenced-frame-set-name-and-report-ready-for-outermost-document-to-navigate.html.headers new file mode 100644 index 0000000000..6247f6d632 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/fenced-frame-set-name-and-report-ready-for-outermost-document-to-navigate.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame \ No newline at end of file diff --git a/testing/web-platform/tests/fenced-frame/resources/fledge-bidding-logic.py b/testing/web-platform/tests/fenced-frame/resources/fledge-bidding-logic.py new file mode 100644 index 0000000000..c91b31fd02 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/fledge-bidding-logic.py @@ -0,0 +1,116 @@ +# These functions are used by FLEDGE to determine the logic for the ad buyer. +# For our testing purposes, we only need the minimal amount of boilerplate +# code in place to allow them to be invoked properly and move the FLEDGE +# process along. The tests generally do usually not deal with reporting results, +# so we leave `reportWin` empty unless we need to call registerAdBeacon(). See +# `generateURNFromFledge` in "utils.js" to see how this file is used. + +from wptserve.utils import isomorphic_decode + +def main(request, response): + # Set up response headers. + headers = [ + ('Content-Type', 'Application/Javascript'), + ('Ad-Auction-Allowed', 'true') + ] + + # Parse URL params. + requested_size = request.GET.first(b"requested-size", None) + ad_with_size = request.GET.first(b"ad-with-size", None) + automatic_beacon = request.GET.first(b"automatic-beacon", None) + + # Use URL params to modify Javascript. + requested_size_check = '' + if requested_size is not None: + # request.GET stores URL keys and values in iso-8859-1 binary encoding. We + # have to decode the values back to a string to parse width/height. Don't + # bother sanitizing the size, because it is sanitized before auction logic + # runs already. + width, height = isomorphic_decode(requested_size).split('-') + + requested_size_check = ( + f''' + if (!(browserSignals.requestedSize.width === '{width}') && + (browserSignals.requestedSize.height === '{height}')) {{ + throw new Error('requestedSize missing/incorrect in browserSignals'); + }} + ''' + ) + + render_obj = 'ad.renderURL' + if ad_with_size is not None: + render_obj = '{ url: ad.renderURL, width: "100px", height: "50px" }' + + component_render_obj = 'component.renderURL' + if ad_with_size is not None: + component_render_obj = ( + '''{ + url: component.renderURL, + width: "100px", + height: "50px" + } + ''' + ) + + register_ad_beacon = '' + if automatic_beacon is not None: + register_ad_beacon = ( + '''registerAdBeacon({ + 'reserved.top_navigation_start': + browserSignals.interestGroupOwner + + '/fenced-frame/resources/automatic-beacon-store.py?type=reserved.top_navigation_start', + 'reserved.top_navigation_commit': + browserSignals.interestGroupOwner + + '/fenced-frame/resources/automatic-beacon-store.py?type=reserved.top_navigation_commit', + }); + ''' + ) + + # Generate Javascript. + # Note: Python fstrings use double-brackets ( {{, }} ) to insert bracket + # literals instead of substitution sequences. + generate_bid = ( + f'''function generateBid( + interestGroup, + auctionSignals, + perBuyerSignals, + trustedBiddingSignals, + browserSignals) {{ + {requested_size_check} + const ad = interestGroup.ads[0]; + + // `auctionSignals` controls whether or not component auctions are + // allowed. + let allowComponentAuction = (typeof auctionSignals === 'string' && + auctionSignals.includes('bidderAllowsComponentAuction')); + + let result = {{ + 'ad': ad, + 'bid': 1, + 'render': {render_obj}, + 'allowComponentAuction': allowComponentAuction + }}; + if (interestGroup.adComponents && interestGroup.adComponents.length > 0) + result.adComponents = interestGroup.adComponents.map((component) => {{ + return {component_render_obj}; + }}); + return result; + }} + ''' + ) + + report_win = ( + f'''function reportWin( + auctionSignals, + perBuyerSignals, + sellerSignals, + browserSignals) {{ + {register_ad_beacon} + return; + }} + ''' + ) + + content = f'{generate_bid}\n{report_win}' + + return (headers, content) diff --git a/testing/web-platform/tests/fenced-frame/resources/fledge-decision-logic.py b/testing/web-platform/tests/fenced-frame/resources/fledge-decision-logic.py new file mode 100644 index 0000000000..63b544552c --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/fledge-decision-logic.py @@ -0,0 +1,66 @@ +# These functions are used by FLEDGE to determine the logic for the ad seller. +# For our testing purposes, we only need the minimal amount of boilerplate +# code in place to allow them to be invoked properly and move the FLEDGE +# process along. The tests do not deal with reporting results, so we leave +# `reportResult` empty. See `generateURNFromFledge` in "utils.js" to see how +# this file is used. + +from wptserve.utils import isomorphic_decode + +def main(request, response): + # Set up response headers. + headers = [ + ('Content-Type', 'Application/Javascript'), + ('Ad-Auction-Allowed', 'true') + ] + + # Parse URL params. + requested_size = request.GET.first(b"requested-size", None) + + # Use URL params to modify Javascript. + requested_size_check = '' + if requested_size is not None: + # request.GET stores URL keys and values in iso-8859-1 binary encoding. We + # have to decode the values back to a string to parse width/height. Don't + # bother sanitizing the size, because it is sanitized before auction logic + # runs already. + width, height = isomorphic_decode(requested_size).split('-') + + requested_size_check = ( + f''' + if (!(auctionConfig.requestedSize.width === '{width}') && + (auctionConfig.requestedSize.height === '{height}')) {{ + throw new Error('requestedSize missing/incorrect in auctionConfig'); + }} + ''' + ) + + # Generate Javascript. + # Note: Python fstrings use double-brackets ( {{, }} ) to insert bracket + # literals instead of substitution sequences. + score_ad = ( + f'''function scoreAd( + adMetadata, + bid, + auctionConfig, + trustedScoringSignals, + browserSignals) {{ + {requested_size_check} + return 2*bid; + }} + ''' + ) + + report_result = ( + f'''function reportResult( + auctionConfig, + browserSignals) {{ + {requested_size_check} + return; + }} + ''' + ) + + content = f'{score_ad}\n{report_result}' + + return (headers, content) diff --git a/testing/web-platform/tests/fenced-frame/resources/frame-navigation-inner-create-nested.https.html b/testing/web-platform/tests/fenced-frame/resources/frame-navigation-inner-create-nested.https.html new file mode 100644 index 0000000000..9a56a3d9fb --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/frame-navigation-inner-create-nested.https.html @@ -0,0 +1,48 @@ + + + + +Test nested fenced frame navigation (by a parent frame setting its src). + + + + diff --git a/testing/web-platform/tests/fenced-frame/resources/frame-navigation-inner-create-nested.https.html.headers b/testing/web-platform/tests/fenced-frame/resources/frame-navigation-inner-create-nested.https.html.headers new file mode 100644 index 0000000000..1b63235b7c --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/frame-navigation-inner-create-nested.https.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame diff --git a/testing/web-platform/tests/fenced-frame/resources/frame-navigation-inner-simple.https.html b/testing/web-platform/tests/fenced-frame/resources/frame-navigation-inner-simple.https.html new file mode 100644 index 0000000000..643ea48a76 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/frame-navigation-inner-simple.https.html @@ -0,0 +1,13 @@ + + + +Test that a fenced frame successfully loaded. + + + + diff --git a/testing/web-platform/tests/fenced-frame/resources/frame-navigation-inner-simple.https.html.headers b/testing/web-platform/tests/fenced-frame/resources/frame-navigation-inner-simple.https.html.headers new file mode 100644 index 0000000000..1b63235b7c --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/frame-navigation-inner-simple.https.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame diff --git a/testing/web-platform/tests/fenced-frame/resources/frame-with-intersection-observer.html b/testing/web-platform/tests/fenced-frame/resources/frame-with-intersection-observer.html new file mode 100644 index 0000000000..dd36b20399 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/frame-with-intersection-observer.html @@ -0,0 +1,29 @@ + + + + +
+ + diff --git a/testing/web-platform/tests/fenced-frame/resources/frame-with-intersection-observer.html.headers b/testing/web-platform/tests/fenced-frame/resources/frame-with-intersection-observer.html.headers new file mode 100644 index 0000000000..1b63235b7c --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/frame-with-intersection-observer.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame diff --git a/testing/web-platform/tests/fenced-frame/resources/gamepad-inner.html b/testing/web-platform/tests/fenced-frame/resources/gamepad-inner.html new file mode 100644 index 0000000000..3e253e4915 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/gamepad-inner.html @@ -0,0 +1,13 @@ + + +getGamepads should throw an error in a fenced frame + + diff --git a/testing/web-platform/tests/fenced-frame/resources/gamepad-inner.html.headers b/testing/web-platform/tests/fenced-frame/resources/gamepad-inner.html.headers new file mode 100644 index 0000000000..6247f6d632 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/gamepad-inner.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame \ No newline at end of file diff --git a/testing/web-platform/tests/fenced-frame/resources/get-nested-configs-inner.html b/testing/web-platform/tests/fenced-frame/resources/get-nested-configs-inner.html new file mode 100644 index 0000000000..122debfe27 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/get-nested-configs-inner.html @@ -0,0 +1,10 @@ + + +Send the results of getNestedConfigs() to the embedder + + diff --git a/testing/web-platform/tests/fenced-frame/resources/get-nested-configs-inner.html.headers b/testing/web-platform/tests/fenced-frame/resources/get-nested-configs-inner.html.headers new file mode 100644 index 0000000000..6247f6d632 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/get-nested-configs-inner.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame \ No newline at end of file diff --git a/testing/web-platform/tests/fenced-frame/resources/get-nested-configs-nested-iframe.html b/testing/web-platform/tests/fenced-frame/resources/get-nested-configs-nested-iframe.html new file mode 100644 index 0000000000..9bd5d9f492 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/get-nested-configs-nested-iframe.html @@ -0,0 +1,10 @@ + + +getGamepads should throw an error in a fenced frame + + + + diff --git a/testing/web-platform/tests/fenced-frame/resources/get-nested-configs-nested-iframe.html.headers b/testing/web-platform/tests/fenced-frame/resources/get-nested-configs-nested-iframe.html.headers new file mode 100644 index 0000000000..6247f6d632 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/get-nested-configs-nested-iframe.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame \ No newline at end of file diff --git a/testing/web-platform/tests/fenced-frame/resources/get_battery.html b/testing/web-platform/tests/fenced-frame/resources/get_battery.html new file mode 100644 index 0000000000..0532deca4b --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/get_battery.html @@ -0,0 +1,17 @@ + + +getBattery should fail in a fenced frame + + diff --git a/testing/web-platform/tests/fenced-frame/resources/get_battery.html.headers b/testing/web-platform/tests/fenced-frame/resources/get_battery.html.headers new file mode 100644 index 0000000000..1b63235b7c --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/get_battery.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame diff --git a/testing/web-platform/tests/fenced-frame/resources/header-referrer-inner.html b/testing/web-platform/tests/fenced-frame/resources/header-referrer-inner.html new file mode 100644 index 0000000000..2940dbac8e --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/header-referrer-inner.html @@ -0,0 +1,40 @@ + + + +Fenced frame content to report the value of header.referrer + + + + diff --git a/testing/web-platform/tests/fenced-frame/resources/header-referrer-inner.html.headers b/testing/web-platform/tests/fenced-frame/resources/header-referrer-inner.html.headers new file mode 100644 index 0000000000..6247f6d632 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/header-referrer-inner.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame \ No newline at end of file diff --git a/testing/web-platform/tests/fenced-frame/resources/header-secFetchDest-inner.html b/testing/web-platform/tests/fenced-frame/resources/header-secFetchDest-inner.html new file mode 100644 index 0000000000..aa3fe9e34c --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/header-secFetchDest-inner.html @@ -0,0 +1,26 @@ + + + + +Fenced frame content to report the value of `Sec-Fetch-Dest` header + + + + diff --git a/testing/web-platform/tests/fenced-frame/resources/header-secFetchDest-inner.html.headers b/testing/web-platform/tests/fenced-frame/resources/header-secFetchDest-inner.html.headers new file mode 100644 index 0000000000..6247f6d632 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/header-secFetchDest-inner.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame \ No newline at end of file diff --git a/testing/web-platform/tests/fenced-frame/resources/history-back-and-forward-should-not-work-in-fenced-tree-inner.html b/testing/web-platform/tests/fenced-frame/resources/history-back-and-forward-should-not-work-in-fenced-tree-inner.html new file mode 100644 index 0000000000..9620249d76 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/history-back-and-forward-should-not-work-in-fenced-tree-inner.html @@ -0,0 +1,45 @@ + + + +history-back-and-forward-should-not-work-in-fenced-tree-inner + + + + diff --git a/testing/web-platform/tests/fenced-frame/resources/history-back-and-forward-should-not-work-in-fenced-tree-inner.html.headers b/testing/web-platform/tests/fenced-frame/resources/history-back-and-forward-should-not-work-in-fenced-tree-inner.html.headers new file mode 100644 index 0000000000..1b63235b7c --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/history-back-and-forward-should-not-work-in-fenced-tree-inner.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame diff --git a/testing/web-platform/tests/fenced-frame/resources/history-length-fenced-navigations-replace-do-not-contribute-to-joint-inner.html b/testing/web-platform/tests/fenced-frame/resources/history-length-fenced-navigations-replace-do-not-contribute-to-joint-inner.html new file mode 100644 index 0000000000..726fafd65b --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/history-length-fenced-navigations-replace-do-not-contribute-to-joint-inner.html @@ -0,0 +1,115 @@ + + + +Nested fenced frame named navigation helper + + + + diff --git a/testing/web-platform/tests/fenced-frame/resources/history-length-fenced-navigations-replace-do-not-contribute-to-joint-inner.html.headers b/testing/web-platform/tests/fenced-frame/resources/history-length-fenced-navigations-replace-do-not-contribute-to-joint-inner.html.headers new file mode 100644 index 0000000000..1b63235b7c --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/history-length-fenced-navigations-replace-do-not-contribute-to-joint-inner.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame diff --git a/testing/web-platform/tests/fenced-frame/resources/history-length-outer-page-navigation-not-reflected-in-fenced-inner.html b/testing/web-platform/tests/fenced-frame/resources/history-length-outer-page-navigation-not-reflected-in-fenced-inner.html new file mode 100644 index 0000000000..2bdb90ab64 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/history-length-outer-page-navigation-not-reflected-in-fenced-inner.html @@ -0,0 +1,72 @@ + + +history-length-outer-page-navigation-not-reflected-in-fenced-inner + + + + \ No newline at end of file diff --git a/testing/web-platform/tests/fenced-frame/resources/history-length-outer-page-navigation-not-reflected-in-fenced-inner.html.headers b/testing/web-platform/tests/fenced-frame/resources/history-length-outer-page-navigation-not-reflected-in-fenced-inner.html.headers new file mode 100644 index 0000000000..1b63235b7c --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/history-length-outer-page-navigation-not-reflected-in-fenced-inner.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame diff --git a/testing/web-platform/tests/fenced-frame/resources/ignore-child-fenced-frame-onload-event-inner.html b/testing/web-platform/tests/fenced-frame/resources/ignore-child-fenced-frame-onload-event-inner.html new file mode 100644 index 0000000000..4fe496f29c --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/ignore-child-fenced-frame-onload-event-inner.html @@ -0,0 +1,41 @@ + +child frame with delayed onload event + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/resources/ignore-child-fenced-frame-onload-event-inner.html.headers b/testing/web-platform/tests/fenced-frame/resources/ignore-child-fenced-frame-onload-event-inner.html.headers new file mode 100644 index 0000000000..6247f6d632 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/ignore-child-fenced-frame-onload-event-inner.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame \ No newline at end of file diff --git a/testing/web-platform/tests/fenced-frame/resources/key-value-store.py b/testing/web-platform/tests/fenced-frame/resources/key-value-store.py new file mode 100644 index 0000000000..c9fd81b2a3 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/key-value-store.py @@ -0,0 +1,46 @@ +"""Key-Value store server. + +The request takes "key=" and "value=" URL parameters. The key must be UUID +generated by token(). + +- When only the "key=" is specified, serves a 200 response whose body contains + the stored value specified by the key. If the stored value doesn't exist, + serves a 200 response with an empty body. +- When both the "key=" and "value=" are specified, stores the pair and serves + a 200 response without body. +""" + + +def main(request, response): + key = request.GET.get(b"key") + value = request.GET.get(b"value") + + # Store the value. + # We have two ways to check the truthiness of `value`: + # 1. `if value` + # 2. `if value != None` + # While (1) is the most intuitive, we actually need (2), which is a looser + # check. We need the looser check so that if the URL contains `&value=` to + # set the value equal to the empty string (a case we need to support), this + # condition still evaluates to true and we enter this branch. + if value != None: + # We opted for (2) above which is the looser of the truthiness tests + # that lets empty strings into this branch. So you might think that when + # the URL contains `&value=`, then the `value` variable here would be + # equal `""`, but instead it equals the empty byte string. If you just + # store that empty byte string into the stash and retrieve it later, you + # actually get because it doesn't recognize the empty byte + # string as a real value, so we instead have to override it to the empty + # normal string, and then we can store it for later use. This is + # because we have to support storage and retrieval of empty strings. + if type(value) is bytes and value == b'': + value = "" + + request.server.stash.put(key, value) + return (200, [], b"") + + # Get the value. + data = request.server.stash.take(key) + if not data and data != "": + return (200, [], b"") + return (200, [], data) diff --git a/testing/web-platform/tests/fenced-frame/resources/location-ancestorOrigins-inner.https.html b/testing/web-platform/tests/fenced-frame/resources/location-ancestorOrigins-inner.https.html new file mode 100644 index 0000000000..3c9411c520 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/location-ancestorOrigins-inner.https.html @@ -0,0 +1,53 @@ + + + +Fenced frame content to report the value of location.ancestorOrigins + + + + diff --git a/testing/web-platform/tests/fenced-frame/resources/location-ancestorOrigins-inner.https.html.headers b/testing/web-platform/tests/fenced-frame/resources/location-ancestorOrigins-inner.https.html.headers new file mode 100644 index 0000000000..6247f6d632 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/location-ancestorOrigins-inner.https.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame \ No newline at end of file diff --git a/testing/web-platform/tests/fenced-frame/resources/navigate-ancestor-destination.https.html b/testing/web-platform/tests/fenced-frame/resources/navigate-ancestor-destination.https.html new file mode 100644 index 0000000000..f12849c8ec --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/navigate-ancestor-destination.https.html @@ -0,0 +1,17 @@ + + +Nested fenced frame named navigation helper + + diff --git a/testing/web-platform/tests/fenced-frame/resources/navigate-ancestor-destination.https.html.headers b/testing/web-platform/tests/fenced-frame/resources/navigate-ancestor-destination.https.html.headers new file mode 100644 index 0000000000..6247f6d632 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/navigate-ancestor-destination.https.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame \ No newline at end of file diff --git a/testing/web-platform/tests/fenced-frame/resources/navigate-ancestor-from-nested-fenced-frame.https.html b/testing/web-platform/tests/fenced-frame/resources/navigate-ancestor-from-nested-fenced-frame.https.html new file mode 100644 index 0000000000..74800b969f --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/navigate-ancestor-from-nested-fenced-frame.https.html @@ -0,0 +1,39 @@ + +Navigate ancestor helper + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/resources/navigate-ancestor-from-nested-fenced-frame.https.html.headers b/testing/web-platform/tests/fenced-frame/resources/navigate-ancestor-from-nested-fenced-frame.https.html.headers new file mode 100644 index 0000000000..6247f6d632 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/navigate-ancestor-from-nested-fenced-frame.https.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame \ No newline at end of file diff --git a/testing/web-platform/tests/fenced-frame/resources/navigate-ancestor-from-nested-iframe.https.html b/testing/web-platform/tests/fenced-frame/resources/navigate-ancestor-from-nested-iframe.https.html new file mode 100644 index 0000000000..63a0cca8b4 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/navigate-ancestor-from-nested-iframe.https.html @@ -0,0 +1,38 @@ + +Navigate ancestor helper from nested fenced frame + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/resources/navigate-ancestor-from-nested-iframe.https.html.headers b/testing/web-platform/tests/fenced-frame/resources/navigate-ancestor-from-nested-iframe.https.html.headers new file mode 100644 index 0000000000..6247f6d632 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/navigate-ancestor-from-nested-iframe.https.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame \ No newline at end of file diff --git a/testing/web-platform/tests/fenced-frame/resources/navigate-ancestor-helper.https.html b/testing/web-platform/tests/fenced-frame/resources/navigate-ancestor-helper.https.html new file mode 100644 index 0000000000..2cd8fcf786 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/navigate-ancestor-helper.https.html @@ -0,0 +1,33 @@ + +Navigate ancestor helper + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/resources/navigate-ancestor-helper.https.html.headers b/testing/web-platform/tests/fenced-frame/resources/navigate-ancestor-helper.https.html.headers new file mode 100644 index 0000000000..6247f6d632 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/navigate-ancestor-helper.https.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame \ No newline at end of file diff --git a/testing/web-platform/tests/fenced-frame/resources/navigate-ancestor-helper.js b/testing/web-platform/tests/fenced-frame/resources/navigate-ancestor-helper.js new file mode 100644 index 0000000000..ade17c69f2 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/navigate-ancestor-helper.js @@ -0,0 +1,28 @@ + +async function runNavigateAncestorTest(test_type, ancestor_type) { + // See documentation in `resources/navigate-ancestor-test-runner.https.html`. + // For each test type here, this document opens a new auxiliary window that + // runs the actual test. The tests in some way or another, direct a frame + // *inside* a fenced frame to navigate an ancestor frame via an + //
. We need to run the real test in a new window + // so that if that window ends up navigating unexpectedly (because the fenced + // frame can accidentally navigated its embedder, for example) we can detect + // it from ths page, which never navigates away. + const navigate_ancestor_key = token(); + const navigate_ancestor_from_nested_key = token(); + + const win = window.open(generateURL( + "resources/navigate-ancestor-test-runner.https.html", + [navigate_ancestor_key, navigate_ancestor_from_nested_key])); + await new Promise(resolve => { + win.onload = resolve; + }); + + const pagehidePromise = new Promise(resolve => { + win.onpagehide = resolve; + }); + + await win.runTest(test_type, ancestor_type); + win.close(); + await pagehidePromise; +} diff --git a/testing/web-platform/tests/fenced-frame/resources/navigate-ancestor-test-runner.https.html b/testing/web-platform/tests/fenced-frame/resources/navigate-ancestor-test-runner.https.html new file mode 100644 index 0000000000..d0f2e8d694 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/navigate-ancestor-test-runner.https.html @@ -0,0 +1,76 @@ + +Test navigating an ancestor frame from within a fenced frame + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/resources/navigate-by-name-inner.html b/testing/web-platform/tests/fenced-frame/resources/navigate-by-name-inner.html new file mode 100644 index 0000000000..c7d7d6f278 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/navigate-by-name-inner.html @@ -0,0 +1,45 @@ + + + +Fenced frame hosting named frames + + + + diff --git a/testing/web-platform/tests/fenced-frame/resources/navigate-by-name-inner.html.headers b/testing/web-platform/tests/fenced-frame/resources/navigate-by-name-inner.html.headers new file mode 100644 index 0000000000..6247f6d632 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/navigate-by-name-inner.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame \ No newline at end of file diff --git a/testing/web-platform/tests/fenced-frame/resources/navigate-by-name-reporting-helper.html b/testing/web-platform/tests/fenced-frame/resources/navigate-by-name-reporting-helper.html new file mode 100644 index 0000000000..d3bd955697 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/navigate-by-name-reporting-helper.html @@ -0,0 +1,34 @@ + + +Navigate reporting helper + + + diff --git a/testing/web-platform/tests/fenced-frame/resources/navigate-by-name-reporting-helper.html.headers b/testing/web-platform/tests/fenced-frame/resources/navigate-by-name-reporting-helper.html.headers new file mode 100644 index 0000000000..6247f6d632 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/navigate-by-name-reporting-helper.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame \ No newline at end of file diff --git a/testing/web-platform/tests/fenced-frame/resources/navigate-nested-config.html b/testing/web-platform/tests/fenced-frame/resources/navigate-nested-config.html new file mode 100644 index 0000000000..85c5194c6c --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/navigate-nested-config.html @@ -0,0 +1,14 @@ + + + +Navigate a fenced frame to a nested config + + + + diff --git a/testing/web-platform/tests/fenced-frame/resources/navigate-nested-config.html.headers b/testing/web-platform/tests/fenced-frame/resources/navigate-nested-config.html.headers new file mode 100644 index 0000000000..6247f6d632 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/navigate-nested-config.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame \ No newline at end of file diff --git a/testing/web-platform/tests/fenced-frame/resources/navigator-keyboard-layout-map-inner.html b/testing/web-platform/tests/fenced-frame/resources/navigator-keyboard-layout-map-inner.html new file mode 100644 index 0000000000..59170c7512 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/navigator-keyboard-layout-map-inner.html @@ -0,0 +1,21 @@ + + +Fenced frame content to report the value of navigator.keyboard.getLayoutMap + + + + diff --git a/testing/web-platform/tests/fenced-frame/resources/navigator-keyboard-layout-map-inner.html.headers b/testing/web-platform/tests/fenced-frame/resources/navigator-keyboard-layout-map-inner.html.headers new file mode 100644 index 0000000000..6247f6d632 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/navigator-keyboard-layout-map-inner.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame \ No newline at end of file diff --git a/testing/web-platform/tests/fenced-frame/resources/navigator-keyboard-lock-inner.html b/testing/web-platform/tests/fenced-frame/resources/navigator-keyboard-lock-inner.html new file mode 100644 index 0000000000..105166c7ad --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/navigator-keyboard-lock-inner.html @@ -0,0 +1,21 @@ + + +Fenced frame content to report the value of navigator.keyboard.lock + + + + diff --git a/testing/web-platform/tests/fenced-frame/resources/navigator-keyboard-lock-inner.html.headers b/testing/web-platform/tests/fenced-frame/resources/navigator-keyboard-lock-inner.html.headers new file mode 100644 index 0000000000..6247f6d632 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/navigator-keyboard-lock-inner.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame \ No newline at end of file diff --git a/testing/web-platform/tests/fenced-frame/resources/notification-sw.js b/testing/web-platform/tests/fenced-frame/resources/notification-sw.js new file mode 100644 index 0000000000..e9b1e2b9dd --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/notification-sw.js @@ -0,0 +1,20 @@ +self.addEventListener('install', e => e.waitUntil(skipWaiting())); +self.addEventListener('activate', e => e.waitUntil(clients.claim())); + +self.addEventListener('message', async event => { + const method = event.data; + + if (method === 'constructor') { + try { + new Notification('test'); + } catch (e) { + event.source.postMessage(e.message); + } + } else if (method === 'showNotification') { + try { + await self.registration.showNotification('test', {body: 'test'}); + } catch (e) { + event.source.postMessage(e.message); + } + } +}); diff --git a/testing/web-platform/tests/fenced-frame/resources/opaque-ad-sizes-utils.js b/testing/web-platform/tests/fenced-frame/resources/opaque-ad-sizes-utils.js new file mode 100644 index 0000000000..edf8640f20 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/opaque-ad-sizes-utils.js @@ -0,0 +1,47 @@ +async function runOpaqueAdSizesTest(input_width, input_height, output_width, output_height) { + // Attach a FLEDGE fenced frame whose outer container has dimensions + // `input_width` by `input_height`. + const frame = await attachFencedFrameContext({ + generator_api: "fledge", resolve_to_config: true, attributes: [ + ["width", input_width], ["height", input_height]]}); + + const assert_dimensions = + (label, input_width, input_height, output_width, output_height) => { + assert_equals(getComputedStyle(document.documentElement).width, + output_width+"px", + label + " the computed width coerces to " + output_width); + assert_equals(window.innerWidth, output_width, + label + " the innerWidth " + input_width + " coerces to " + output_width); + assert_equals(window.innerHeight, output_height, + label + " the innerHeight " + input_height + " coerces to " + output_height); + } + + // Assert that the fenced frame sees its dimensions rounded to the nearest + // ad size. + await frame.execute(assert_dimensions, + ["After navigation", input_width, input_height, output_width, output_height]); + + // Assert that the embedder sees the fenced frame's original dimensions. + assert_equals(frame.width, input_width.toString(), + "The outer container width is the requested width."); + assert_equals(frame.height, input_height.toString(), + "The outer container height is the requested height."); + + // Resize the fenced frame's outer container. + const new_size_x = 320; + const new_size_y = 50; + frame.width = new_size_x; + frame.height = new_size_y; + + // Refresh the fenced frame. + await frame.execute(() => { + window.executor.suspend(() => { + location.href = location.href; + }); + }); + + // Observe that navigations after the first don't change the fenced frame's + // inner dimensions. + await frame.execute(assert_dimensions, + ["After resizing", input_width, input_height, output_width, output_height]); +} diff --git a/testing/web-platform/tests/fenced-frame/resources/payment-handler-sw.js b/testing/web-platform/tests/fenced-frame/resources/payment-handler-sw.js new file mode 100644 index 0000000000..8b5e83cddf --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/payment-handler-sw.js @@ -0,0 +1,10 @@ +self.addEventListener('install', e => e.waitUntil(skipWaiting())); +self.addEventListener('activate', e => e.waitUntil(clients.claim())); + +self.addEventListener('message', event => { + try { + self.registration.paymentManager; + } catch (e) { + event.source.postMessage(e); + } +}); diff --git a/testing/web-platform/tests/fenced-frame/resources/permission-api-denied-inner.html b/testing/web-platform/tests/fenced-frame/resources/permission-api-denied-inner.html new file mode 100644 index 0000000000..06724ac061 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/permission-api-denied-inner.html @@ -0,0 +1,15 @@ + + +Fenced frame content to report the result of navigator.permissions.query + + + + diff --git a/testing/web-platform/tests/fenced-frame/resources/permission-api-denied-inner.html.headers b/testing/web-platform/tests/fenced-frame/resources/permission-api-denied-inner.html.headers new file mode 100644 index 0000000000..1b63235b7c --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/permission-api-denied-inner.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame diff --git a/testing/web-platform/tests/fenced-frame/resources/permission-geolocation-inner.html b/testing/web-platform/tests/fenced-frame/resources/permission-geolocation-inner.html new file mode 100644 index 0000000000..07c3e662bf --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/permission-geolocation-inner.html @@ -0,0 +1,16 @@ + + +Fenced frame content to report the result of navigator.geolocation.getCurrentPosition() + + + + \ No newline at end of file diff --git a/testing/web-platform/tests/fenced-frame/resources/permission-geolocation-inner.html.headers b/testing/web-platform/tests/fenced-frame/resources/permission-geolocation-inner.html.headers new file mode 100644 index 0000000000..1b63235b7c --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/permission-geolocation-inner.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame diff --git a/testing/web-platform/tests/fenced-frame/resources/permission-geolocation-test-runner.html b/testing/web-platform/tests/fenced-frame/resources/permission-geolocation-test-runner.html new file mode 100644 index 0000000000..724a35ce9a --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/permission-geolocation-test-runner.html @@ -0,0 +1,24 @@ + +Fenced frame content to report the result of navigator.geolocation.getCurrentPosition() + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/resources/permission-notification-inner.html b/testing/web-platform/tests/fenced-frame/resources/permission-notification-inner.html new file mode 100644 index 0000000000..d01d10034c --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/permission-notification-inner.html @@ -0,0 +1,13 @@ + + +Fenced frame content to report the result of Notification.requestPermission + + + + diff --git a/testing/web-platform/tests/fenced-frame/resources/permission-notification-inner.html.headers b/testing/web-platform/tests/fenced-frame/resources/permission-notification-inner.html.headers new file mode 100644 index 0000000000..1b63235b7c --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/permission-notification-inner.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame diff --git a/testing/web-platform/tests/fenced-frame/resources/popup-noopener-destination.html b/testing/web-platform/tests/fenced-frame/resources/popup-noopener-destination.html new file mode 100644 index 0000000000..30cc21f22c --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/popup-noopener-destination.html @@ -0,0 +1,20 @@ + + +Destination page opened by a frame in a Fenced Frame tree + diff --git a/testing/web-platform/tests/fenced-frame/resources/popup-noopener-inner.html b/testing/web-platform/tests/fenced-frame/resources/popup-noopener-inner.html new file mode 100644 index 0000000000..6a79fd21b2 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/popup-noopener-inner.html @@ -0,0 +1,48 @@ + + + +Fenced frame creating popups + + + + diff --git a/testing/web-platform/tests/fenced-frame/resources/popup-noopener-inner.html.headers b/testing/web-platform/tests/fenced-frame/resources/popup-noopener-inner.html.headers new file mode 100644 index 0000000000..1b63235b7c --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/popup-noopener-inner.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame diff --git a/testing/web-platform/tests/fenced-frame/resources/postmessage-config.html b/testing/web-platform/tests/fenced-frame/resources/postmessage-config.html new file mode 100644 index 0000000000..3c20190420 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/postmessage-config.html @@ -0,0 +1,14 @@ + + +A page opened in a pop-up that sends a FencedFrameConfig + diff --git a/testing/web-platform/tests/fenced-frame/resources/prerender-inner.html b/testing/web-platform/tests/fenced-frame/resources/prerender-inner.html new file mode 100644 index 0000000000..a523ef31c1 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/prerender-inner.html @@ -0,0 +1,20 @@ + + +Fenced frame content to report the result of prerendering + + + + diff --git a/testing/web-platform/tests/fenced-frame/resources/prerender-inner.html.headers b/testing/web-platform/tests/fenced-frame/resources/prerender-inner.html.headers new file mode 100644 index 0000000000..1b63235b7c --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/prerender-inner.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame diff --git a/testing/web-platform/tests/fenced-frame/resources/presentation-receiver-inner.html b/testing/web-platform/tests/fenced-frame/resources/presentation-receiver-inner.html new file mode 100644 index 0000000000..2e170dd91b --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/presentation-receiver-inner.html @@ -0,0 +1,17 @@ + + +Fenced frame content to report the result of navigator.presentation.receiver + + + + diff --git a/testing/web-platform/tests/fenced-frame/resources/presentation-receiver-inner.html.headers b/testing/web-platform/tests/fenced-frame/resources/presentation-receiver-inner.html.headers new file mode 100644 index 0000000000..1b63235b7c --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/presentation-receiver-inner.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame diff --git a/testing/web-platform/tests/fenced-frame/resources/remote-context-executor.https.html b/testing/web-platform/tests/fenced-frame/resources/remote-context-executor.https.html new file mode 100644 index 0000000000..6b2f5ccc00 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/remote-context-executor.https.html @@ -0,0 +1,29 @@ + + + + + + + + + +Script to wait for instructions from RemoteContext. + + + + diff --git a/testing/web-platform/tests/fenced-frame/resources/report-url.html b/testing/web-platform/tests/fenced-frame/resources/report-url.html new file mode 100644 index 0000000000..e0b7d0982a --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/report-url.html @@ -0,0 +1,7 @@ + + +A page embedded as a fenced frame that reports the document URL + diff --git a/testing/web-platform/tests/fenced-frame/resources/report-url.html.headers b/testing/web-platform/tests/fenced-frame/resources/report-url.html.headers new file mode 100644 index 0000000000..6247f6d632 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/report-url.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame \ No newline at end of file diff --git a/testing/web-platform/tests/fenced-frame/resources/resize-lock-inner.html b/testing/web-platform/tests/fenced-frame/resources/resize-lock-inner.html new file mode 100644 index 0000000000..fbaf436330 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/resize-lock-inner.html @@ -0,0 +1,23 @@ + + + Fenced frame content to report any changes in inner dimensions + + + + + \ No newline at end of file diff --git a/testing/web-platform/tests/fenced-frame/resources/resize-lock-inner.html.headers b/testing/web-platform/tests/fenced-frame/resources/resize-lock-inner.html.headers new file mode 100644 index 0000000000..6247f6d632 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/resize-lock-inner.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame \ No newline at end of file diff --git a/testing/web-platform/tests/fenced-frame/resources/response-204.py b/testing/web-platform/tests/fenced-frame/resources/response-204.py new file mode 100644 index 0000000000..e6cf8d4ac9 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/response-204.py @@ -0,0 +1,4 @@ +def main(request, response): + response_headers = [] + body = "No content" + return (204, response_headers, body) \ No newline at end of file diff --git a/testing/web-platform/tests/fenced-frame/resources/sandbox-mandatory-flags-iframe.sub.html b/testing/web-platform/tests/fenced-frame/resources/sandbox-mandatory-flags-iframe.sub.html new file mode 100644 index 0000000000..7ee8b7d98f --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/sandbox-mandatory-flags-iframe.sub.html @@ -0,0 +1,13 @@ + +Iframe content to load a fenced frame and report a value to the server + + + + + diff --git a/testing/web-platform/tests/fenced-frame/resources/sandbox-mandatory-flags-inner.sub.html b/testing/web-platform/tests/fenced-frame/resources/sandbox-mandatory-flags-inner.sub.html new file mode 100644 index 0000000000..5f400b5bde --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/sandbox-mandatory-flags-inner.sub.html @@ -0,0 +1,6 @@ + +Fenced frame content to report a value to the server + + + + diff --git a/testing/web-platform/tests/fenced-frame/resources/sandbox-mandatory-flags-inner.sub.html.headers b/testing/web-platform/tests/fenced-frame/resources/sandbox-mandatory-flags-inner.sub.html.headers new file mode 100644 index 0000000000..1b63235b7c --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/sandbox-mandatory-flags-inner.sub.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame diff --git a/testing/web-platform/tests/fenced-frame/resources/sandbox-mandatory-flags-looser-restriction.sub.html b/testing/web-platform/tests/fenced-frame/resources/sandbox-mandatory-flags-looser-restriction.sub.html new file mode 100644 index 0000000000..0ad64c1a5c --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/sandbox-mandatory-flags-looser-restriction.sub.html @@ -0,0 +1,14 @@ + +Iframe content to load a nested sandboxed iframe with all mandatory allow-* flags + + + + diff --git a/testing/web-platform/tests/fenced-frame/resources/sandboxed-features-inner.sub.html b/testing/web-platform/tests/fenced-frame/resources/sandboxed-features-inner.sub.html new file mode 100644 index 0000000000..f3bcbc8ba1 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/sandboxed-features-inner.sub.html @@ -0,0 +1,20 @@ + + + + + + + + + + \ No newline at end of file diff --git a/testing/web-platform/tests/fenced-frame/resources/sandboxed-features-inner.sub.html.headers b/testing/web-platform/tests/fenced-frame/resources/sandboxed-features-inner.sub.html.headers new file mode 100644 index 0000000000..6247f6d632 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/sandboxed-features-inner.sub.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame \ No newline at end of file diff --git a/testing/web-platform/tests/fenced-frame/resources/sandboxed-features-looser-restriction.sub.html b/testing/web-platform/tests/fenced-frame/resources/sandboxed-features-looser-restriction.sub.html new file mode 100644 index 0000000000..44584440e1 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/sandboxed-features-looser-restriction.sub.html @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/testing/web-platform/tests/fenced-frame/resources/sandboxed-features-looser-restriction.sub.html.headers b/testing/web-platform/tests/fenced-frame/resources/sandboxed-features-looser-restriction.sub.html.headers new file mode 100644 index 0000000000..6247f6d632 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/sandboxed-features-looser-restriction.sub.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame \ No newline at end of file diff --git a/testing/web-platform/tests/fenced-frame/resources/sandboxed-features.js b/testing/web-platform/tests/fenced-frame/resources/sandboxed-features.js new file mode 100644 index 0000000000..1cbd4a48f3 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/sandboxed-features.js @@ -0,0 +1,126 @@ +const run_in_fenced_frame = (func_name, description, is_nested) => { + promise_test(async test => { + const key = token(); + const url = is_nested ? + 'resources/sandboxed-features-looser-restriction.sub.html?' : + 'resources/sandboxed-features-inner.sub.html?'; + let params = new URLSearchParams(); + params.set('key', key); + params.set('test_func', func_name); + const frame = document.createElement('fencedframe'); + const frame_url = 'resources/sandboxed-features-inner.sub.html?' + + params.toString(); + const config = new FencedFrameConfig(generateURL(frame_url, [])); + frame.config = config; + test.add_cleanup(() => { + frame.remove(); + }); + document.body.appendChild(frame); + assert_equals(await nextValueFromServer(key), 'done'); + }, description); +}; + +const run_sanboxed_feature_test = (func_name, description) => { + run_in_fenced_frame(func_name, description, false); + run_in_fenced_frame(func_name, description + '[looser sandboxed]', true); +}; + +async function test_prompt() { + assert_equals( + window.prompt('Test prompt'), + null, + 'window.prompt() must synchronously return null in a fenced frame without' + + ' blocking on user input.'); +} + +async function test_alert() { + assert_equals( + window.alert('Test alert'), + undefined, + 'window.alert() must synchronously return undefined in a fenced frame' + + ' without blocking on user input.'); +} + +async function test_confirm() { + assert_equals( + window.confirm('Test confirm'), + false, + 'window.confirm() must synchronously return false in a fenced frame' + + ' without blocking on user input.'); +} + +async function test_print() { + assert_equals( + window.print(), + undefined, + 'window.print() must synchronously return undefined in a fenced frame' + + ' without blocking on user input.'); + + assert_equals( + document.execCommand('print', false, null), + false, + 'execCommand(\'print\') must synchronously return false in a fenced frame' + + ' without blocking on user input.'); +} + +async function test_document_domain() { + assert_throws_dom('SecurityError', () => { + document.domain = 'example.test'; + }); + assert_throws_dom('SecurityError', () => { + document.domain = document.domain; + }); + assert_throws_dom('SecurityError', () => { + (new Document).domain = document.domain; + }); + assert_throws_dom('SecurityError', () => { + document.implementation.createHTMLDocument().domain = document.domain; + }); + assert_throws_dom('SecurityError', () => { + document.implementation.createDocument(null, '').domain = document.domain; + }); + assert_throws_dom('SecurityError', () => { + document.createElement('template').content.ownerDocument.domain = + document.domain; + }); +} + +async function test_presentation_request() { + assert_throws_dom('SecurityError', () => { + new PresentationRequest([location.href]); + }); +} + +async function test_screen_orientation_lock() { + try { + await screen.orientation.lock('portrait'); + } catch (e) { + assert_equals( + e.name, + 'SecurityError', + 'orientation.lock() must throw a SecurityError in a fenced frame.'); + return; + } + assert_unreached('orientation.lock() must throw an error'); +} + +async function test_pointer_lock() { + await simulateGesture(); + + const canvas = document.createElement('canvas'); + document.body.appendChild(canvas); + const pointerlockerror_promise = new Promise(resolve => { + document.addEventListener('pointerlockerror', resolve); + }); + try { + await canvas.requestPointerLock(); + } catch (e) { + assert_equals( + e.name, + 'SecurityError', + 'orientation.lock() must throws a SecurityError in a fenced frame.'); + await pointerlockerror_promise; + return; + } + assert_unreached('requestPointerLock() must fail in a fenced frame'); +} diff --git a/testing/web-platform/tests/fenced-frame/resources/serviceWorker-dedicated-worker-inner.html b/testing/web-platform/tests/fenced-frame/resources/serviceWorker-dedicated-worker-inner.html new file mode 100644 index 0000000000..02f28bd82e --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/serviceWorker-dedicated-worker-inner.html @@ -0,0 +1,28 @@ + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/resources/serviceWorker-dedicated-worker-inner.html.headers b/testing/web-platform/tests/fenced-frame/resources/serviceWorker-dedicated-worker-inner.html.headers new file mode 100644 index 0000000000..6247f6d632 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/serviceWorker-dedicated-worker-inner.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame \ No newline at end of file diff --git a/testing/web-platform/tests/fenced-frame/resources/serviceWorker-dedicated-worker-sw.js b/testing/web-platform/tests/fenced-frame/resources/serviceWorker-dedicated-worker-sw.js new file mode 100644 index 0000000000..027995a218 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/serviceWorker-dedicated-worker-sw.js @@ -0,0 +1,18 @@ +self.addEventListener('fetch', async (e) => { + if (e.request.url.includes('fenced_frame_dedicated_worker_test')) { + e.respondWith(new Response('OK')); + return; + } + + e.respondWith(fetch(e.request).catch(() => { + return new Response('not found'); + })); +}) + +self.addEventListener('install', () => { + return self.skipWaiting(); +}); + +self.addEventListener('activate', () => { + return self.clients.claim(); +}); diff --git a/testing/web-platform/tests/fenced-frame/resources/serviceWorker-dedicated-worker-sw.js.headers b/testing/web-platform/tests/fenced-frame/resources/serviceWorker-dedicated-worker-sw.js.headers new file mode 100644 index 0000000000..d0b9633bb0 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/serviceWorker-dedicated-worker-sw.js.headers @@ -0,0 +1 @@ +Service-Worker-Allowed: / diff --git a/testing/web-platform/tests/fenced-frame/resources/serviceWorker-dedicated-worker.js b/testing/web-platform/tests/fenced-frame/resources/serviceWorker-dedicated-worker.js new file mode 100644 index 0000000000..8a9fa5ef36 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/serviceWorker-dedicated-worker.js @@ -0,0 +1,8 @@ +self.addEventListener('message', async (e) => { + if (e.data === 'fetch') { + // Send a request to non-existing URL but handled by SW. + const res = await fetch('./fenced_frame_dedicated_worker_test'); + const data = res.ok ? await res.text() : res.statusText; + self.postMessage(data); + } +}); diff --git a/testing/web-platform/tests/fenced-frame/resources/serviceWorker-frameType-inner.html b/testing/web-platform/tests/fenced-frame/resources/serviceWorker-frameType-inner.html new file mode 100644 index 0000000000..103236e52a --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/serviceWorker-frameType-inner.html @@ -0,0 +1,37 @@ + + + + + \ No newline at end of file diff --git a/testing/web-platform/tests/fenced-frame/resources/serviceWorker-frameType-inner.html.headers b/testing/web-platform/tests/fenced-frame/resources/serviceWorker-frameType-inner.html.headers new file mode 100644 index 0000000000..6247f6d632 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/serviceWorker-frameType-inner.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame \ No newline at end of file diff --git a/testing/web-platform/tests/fenced-frame/resources/serviceWorker-frameType-nested.html b/testing/web-platform/tests/fenced-frame/resources/serviceWorker-frameType-nested.html new file mode 100644 index 0000000000..10bb7ff8bd --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/serviceWorker-frameType-nested.html @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/testing/web-platform/tests/fenced-frame/resources/serviceWorker-frameType-nested.html.headers b/testing/web-platform/tests/fenced-frame/resources/serviceWorker-frameType-nested.html.headers new file mode 100644 index 0000000000..6247f6d632 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/serviceWorker-frameType-nested.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame \ No newline at end of file diff --git a/testing/web-platform/tests/fenced-frame/resources/serviceWorker-frameType.js b/testing/web-platform/tests/fenced-frame/resources/serviceWorker-frameType.js new file mode 100644 index 0000000000..91003fc131 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/serviceWorker-frameType.js @@ -0,0 +1,19 @@ +self.onmessage = function(e) { + var port = e.data.port; + var url = e.data.url; + + e.waitUntil(self.clients.matchAll({includeUncontrolled: true}) + .then(function(clients) { + var frame_type = "none"; + for (client of clients) { + if (client.url === url) { + frame_type = client.frameType; + break; + } + } + port.postMessage(frame_type); + }) + .catch(e => { + port.postMessage('clients.matchAll() rejected: ' + e); + })); +}; \ No newline at end of file diff --git a/testing/web-platform/tests/fenced-frame/resources/serviceWorker-navigate-inner-success.html b/testing/web-platform/tests/fenced-frame/resources/serviceWorker-navigate-inner-success.html new file mode 100644 index 0000000000..4d77d9e9a6 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/serviceWorker-navigate-inner-success.html @@ -0,0 +1,11 @@ + + + + + diff --git a/testing/web-platform/tests/fenced-frame/resources/serviceWorker-navigate-inner-success.html.headers b/testing/web-platform/tests/fenced-frame/resources/serviceWorker-navigate-inner-success.html.headers new file mode 100644 index 0000000000..6247f6d632 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/serviceWorker-navigate-inner-success.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame \ No newline at end of file diff --git a/testing/web-platform/tests/fenced-frame/resources/serviceWorker-navigate-inner.html b/testing/web-platform/tests/fenced-frame/resources/serviceWorker-navigate-inner.html new file mode 100644 index 0000000000..aaf330f4f6 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/serviceWorker-navigate-inner.html @@ -0,0 +1,16 @@ + + + + + diff --git a/testing/web-platform/tests/fenced-frame/resources/serviceWorker-navigate-inner.html.headers b/testing/web-platform/tests/fenced-frame/resources/serviceWorker-navigate-inner.html.headers new file mode 100644 index 0000000000..6247f6d632 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/serviceWorker-navigate-inner.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame \ No newline at end of file diff --git a/testing/web-platform/tests/fenced-frame/resources/serviceWorker-navigate.js b/testing/web-platform/tests/fenced-frame/resources/serviceWorker-navigate.js new file mode 100644 index 0000000000..a7a4db52ee --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/serviceWorker-navigate.js @@ -0,0 +1,18 @@ +self.importScripts('utils.js'); + +self.onmessage = function(e) { + var key = e.data.key; + var url = e.data.url; + + e.waitUntil(self.clients.claim().then(() => { + return self.clients.matchAll({type: 'window'}); + }).then(clients => { + return clients.map(client => { + // Check to make sure WindowClient.navigate() is supported. + if (client.url === url) { + return client.navigate(generateURL('serviceWorker-navigate-inner-success.html', + [key])); + } + }); + })); +}; diff --git a/testing/web-platform/tests/fenced-frame/resources/serviceWorker-push-sw.js b/testing/web-platform/tests/fenced-frame/resources/serviceWorker-push-sw.js new file mode 100644 index 0000000000..e344b45fd8 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/serviceWorker-push-sw.js @@ -0,0 +1,19 @@ +self.addEventListener('install', e => e.waitUntil(skipWaiting())); +self.addEventListener('activate', e => e.waitUntil(clients.claim())); + +self.addEventListener('message', async e => { + const method = e.data; + + const promise = method === 'subscribe' ? + self.registration.pushManager.subscribe({userVisibleOnly: true}) : + Promise.resolve(); + const message = await promise + .then(() => { + return `${method}: Unexpectedly started`; + }) + .catch((e) => { + return e.message; + }); + + e.source.postMessage(message); +}); diff --git a/testing/web-platform/tests/fenced-frame/resources/unique-cookie-partition-inner.https.html b/testing/web-platform/tests/fenced-frame/resources/unique-cookie-partition-inner.https.html new file mode 100644 index 0000000000..1cf3fc8680 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/unique-cookie-partition-inner.https.html @@ -0,0 +1,42 @@ + + + +Fenced frame accessing cookies + + + + diff --git a/testing/web-platform/tests/fenced-frame/resources/unique-cookie-partition-inner.https.html.headers b/testing/web-platform/tests/fenced-frame/resources/unique-cookie-partition-inner.https.html.headers new file mode 100644 index 0000000000..e2b453f463 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/unique-cookie-partition-inner.https.html.headers @@ -0,0 +1,2 @@ +Supports-Loading-Mode: fenced-frame +Set-Cookie: F=fenced; SameSite=Lax diff --git a/testing/web-platform/tests/fenced-frame/resources/unreached.https.html b/testing/web-platform/tests/fenced-frame/resources/unreached.https.html new file mode 100644 index 0000000000..bd389ec4fb --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/unreached.https.html @@ -0,0 +1,15 @@ + +File used to assert that navigations do not succeed. + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/resources/utils.js b/testing/web-platform/tests/fenced-frame/resources/utils.js new file mode 100644 index 0000000000..cbea173f17 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/utils.js @@ -0,0 +1,648 @@ +const STORE_URL = '/fenced-frame/resources/key-value-store.py'; +const BEACON_URL = '/fenced-frame/resources/automatic-beacon-store.py'; +const REMOTE_EXECUTOR_URL = '/fenced-frame/resources/remote-context-executor.https.html'; + +// If your test needs to modify FLEDGE bidding or decision logic, you should +// update the generated JS in the corresponding handler below. +const FLEDGE_BIDDING_URL = '/fenced-frame/resources/fledge-bidding-logic.py'; +const FLEDGE_DECISION_URL = '/fenced-frame/resources/fledge-decision-logic.py'; + +// Creates a URL that includes a list of stash key UUIDs that are being used +// in the test. This allows us to generate UUIDs on the fly and let anything +// (iframes, fenced frames, pop-ups, etc...) that wouldn't have access to the +// original UUID variable know what the UUIDs are. +// @param {string} href - The base url of the page being navigated to +// @param {string list} keylist - The list of key UUIDs to be used. Note that +// order matters when extracting the keys +function generateURL(href, keylist) { + const ret_url = new URL(href, location.href); + ret_url.searchParams.append("keylist", keylist.join(',')); + return ret_url; +} + +function getRemoteContextURL(origin) { + return new URL(REMOTE_EXECUTOR_URL, origin); +} + +async function runSelectRawURL(href, resolve_to_config = false) { + try { + await sharedStorage.worklet.addModule( + "/shared-storage/resources/simple-module.js"); + } catch (e) { + // Shared Storage needs to have a module added before we can operate on it. + // It is generated on the fly with this call, and since there's no way to + // tell through the API if a module already exists, wrap the addModule call + // in a try/catch so that if it runs a second time in a test, it will + // gracefully fail rather than bring the whole test down. + } + return await sharedStorage.selectURL( + 'test-url-selection-operation', [{url: href, + reportingMetadata: { + 'reserved.top_navigation_start': BEACON_URL + + "?type=reserved.top_navigation_start", + 'reserved.top_navigation_commit': BEACON_URL + + "?type=reserved.top_navigation_commit", + }}], { + data: {'mockResult': 0}, + resolveToConfig: resolve_to_config, + keepAlive: true, + }); +} + +// Similar to generateURL, but creates +// 1. An urn:uuid if `resolve_to_config` is false. +// 2. A fenced frame config object if `resolve_to_config` is true. +// This relies on a mock Shared Storage auction, since it is the simplest +// WP-exposed way to turn a url into an urn:uuid or a fenced frame config. +// Note: this function, unlike generateURL, is asynchronous and needs to be +// called with an await operator. +// @param {string} href - The base url of the page being navigated to +// @param {string list} keylist - The list of key UUIDs to be used. Note that +// order matters when extracting the keys +// @param {boolean} [resolve_to_config = false] - Determines whether the result +// of `sharedStorage.selectURL()` +// is an urn:uuid or a fenced +// frame config. +// Note: +// 1. There is a limit of 3 calls per origin per pageload for +// `sharedStorage.selectURL()`, so `runSelectURL()` must also respect this +// limit. +// 2. If `resolve_to_config` is true, blink feature `FencedFramesAPIChanges` +// needs to be enabled for `selectURL()` to return a fenced frame config. +// Otherwise `selectURL()` will fall back to the old behavior that returns an +// urn:uuid. +async function runSelectURL(href, keylist = [], resolve_to_config = false) { + const full_url = generateURL(href, keylist); + return await runSelectRawURL(full_url, resolve_to_config); +} + +async function generateURNFromFledgeRawURL( + href, nested_urls, resolve_to_config = false, ad_with_size = false, + requested_size = null, automatic_beacon = false) { + const bidding_token = token(); + const seller_token = token(); + + const ad_components_list = nested_urls.map((url) => { + return ad_with_size ? + { renderURL: url, sizeGroup: "group1" } : + { renderURL: url } + }); + + let interestGroup = + { + name: 'testAd1', + owner: location.origin, + biddingLogicURL: new URL(FLEDGE_BIDDING_URL, location.origin), + ads: [{renderURL: href, bid: 1}], + userBiddingSignals: {biddingToken: bidding_token}, + trustedBiddingSignalsKeys: ['key1'], + adComponents: ad_components_list, + }; + + let biddingURLParams = + new URLSearchParams(interestGroup.biddingLogicURL.search); + if (requested_size) + biddingURLParams.set( + 'requested-size', requested_size[0] + '-' + requested_size[1]); + if (ad_with_size) + biddingURLParams.set('ad-with-size', 1); + if (automatic_beacon) + biddingURLParams.set('automatic-beacon', 1); + interestGroup.biddingLogicURL.search = biddingURLParams; + + if (ad_with_size) { + interestGroup.ads[0].sizeGroup = 'group1'; + interestGroup.adSizes = {'size1': {width: '100px', height: '50px'}}; + interestGroup.sizeGroups = {'group1': ['size1']}; + } + + // Pick an arbitrarily high duration to guarantee that we never leave the + // ad interest group while the test runs. + navigator.joinAdInterestGroup(interestGroup, /*durationSeconds=*/3000000); + + let auctionConfig = { + seller: location.origin, + interestGroupBuyers: [location.origin], + decisionLogicURL: new URL(FLEDGE_DECISION_URL, location.origin), + auctionSignals: {biddingToken: bidding_token, sellerToken: seller_token}, + resolveToConfig: resolve_to_config + }; + + if (requested_size) { + let decisionURLParams = + new URLSearchParams(auctionConfig.decisionLogicURL.search); + decisionURLParams.set( + 'requested-size', requested_size[0] + '-' + requested_size[1]); + auctionConfig.decisionLogicURL.search = decisionURLParams; + + auctionConfig['requestedSize'] = {width: requested_size[0], height: requested_size[1]}; + } + + return navigator.runAdAuction(auctionConfig); +} + +// Similar to runSelectURL, but uses FLEDGE instead of Shared Storage as the +// auctioning tool. +// Note: this function, unlike generateURL, is asynchronous and needs to be +// called with an await operator. @param {string} href - The base url of the +// page being navigated to @param {string list} keylist - The list of key UUIDs +// to be used. Note that order matters when extracting the keys +// @param {string} href - The base url of the page being navigated to +// @param {string list} keylist - The list of key UUIDs to be used. Note that +// order matters when extracting the keys +// @param {string list} nested_urls - A list of urls that will eventually become +// the nested configs/ad components +// @param {boolean} [resolve_to_config = false] - Determines whether the result +// of `navigator.runAdAuction()` +// is an urn:uuid or a fenced +// frame config. +// @param {boolean} [ad_with_size = false] - Determines whether the auction is +// run with ad sizes specified. +// @param {boolean} [automatic_beacon = false] - If true, FLEDGE logic will +// register an automatic beacon +// after completion. +async function generateURNFromFledge( + href, keylist, nested_urls = [], resolve_to_config = false, + ad_with_size = false, requested_size = null, automatic_beacon = false) { + const full_url = generateURL(href, keylist); + return generateURNFromFledgeRawURL( + full_url, nested_urls, resolve_to_config, ad_with_size, requested_size, + automatic_beacon); +} + +// Extracts a list of UUIDs from the from the current page's URL. +// @returns {string list} - The list of UUIDs extracted from the page. This can +// be read into multiple variables using the +// [key1, key2, etc...] = parseKeyList(); pattern. +function parseKeylist() { + const url = new URL(location.href); + const keylist = url.searchParams.get("keylist"); + return keylist.split(','); +} + +// Converts a same-origin URL to a cross-origin URL +// @param {URL} url - The URL object whose origin is being converted +// @param {boolean} [https=true] - Whether or not to use the HTTPS origin +// +// @returns {URL} The new cross-origin URL +function getRemoteOriginURL(url, https=true) { + const same_origin = location.origin; + const cross_origin = https ? get_host_info().HTTPS_REMOTE_ORIGIN + : get_host_info().HTTP_REMOTE_ORIGIN; + return new URL(url.toString().replace(same_origin, cross_origin)); +} + +// Builds a URL to be used as a remote context executor. +function generateRemoteContextURL(headers, origin) { + // Generate the unique id for the parent/child channel. + const uuid = token(); + + // Use the absolute path of the remote context executor source file, so that + // nested contexts will work. + const url = getRemoteContextURL(origin ? origin : location.origin); + url.searchParams.append('uuid', uuid); + + // Add the header to allow loading in a fenced frame. + headers.push(["Supports-Loading-Mode", "fenced-frame"]); + + // Transform the headers into the expected format. + // https://web-platform-tests.org/writing-tests/server-pipes.html#headers + function escape(s) { + return s.replace('(', '\\(').replace(')', '\\)'); + } + const formatted_headers = headers.map((header) => { + return `header(${escape(header[0])}, ${escape(header[1])})`; + }); + url.searchParams.append('pipe', formatted_headers.join('|')); + + return [uuid, url]; +} + +function buildRemoteContextForObject(object, uuid, html) { + // https://github.com/web-platform-tests/wpt/blob/master/common/dispatcher/README.md + const context = new RemoteContext(uuid); + if (html) { + context.execute_script( + (html_source) => { + document.body.insertAdjacentHTML('beforebegin', html_source); + }, + [html]); + } + + // We need a little bit of boilerplate in the handlers because Proxy doesn't + // work so nicely with HTML elements. + const handler = { + get: (target, key) => { + if (key == "execute") { + return context.execute_script; + } + if (key == "element") { + return object; + } + if (key in target) { + return target[key]; + } + return context[key]; + }, + set: (target, key, value) => { + target[key] = value; + return value; + } + }; + + const proxy = new Proxy(object, handler); + return proxy; +} + +// Attaches an object that waits for scripts to execute from RemoteContext. +// (In practice, this is either a frame or a window.) +// Returns a proxy for the object that first resolves to the object itself, +// then resolves to the RemoteContext if the property isn't found. +// The proxy also has an extra attribute `execute`, which is an alias for the +// remote context's `execute_script(fn, args=[])`. +function attachContext(object_constructor, html, headers, origin) { + const [uuid, url] = generateRemoteContextURL(headers, origin); + const object = object_constructor(url); + return buildRemoteContextForObject(object, uuid, html); +} + +// TODO(crbug.com/1347953): Update this function to also test +// `sharedStorage.selectURL()` that returns a fenced frame config object. +// This should be done after fixing the following flaky tests that use this +// function. +// 1. crbug.com/1372536: resize-lock-input.https.html +// 2. crbug.com/1394559: unfenced-top.https.html +async function attachOpaqueContext( + generator_api, resolve_to_config, ad_with_size, requested_size, + automatic_beacon, object_constructor, html, headers, origin, + num_components) { + const [uuid, url] = generateRemoteContextURL(headers, origin); + + let components_list = []; + for (let i = 0; i < num_components; i++) { + let [component_uuid, component_url] = + generateRemoteContextURL(headers, origin); + // This field will be read by attachComponentFrameContext() in order to + // know what uuid to point to when building the remote context. + html += ''; + components_list.push(component_url); + } + + const id = await ( + generator_api == 'fledge' ? + generateURNFromFledge( + url, [], components_list, resolve_to_config, ad_with_size, + requested_size, automatic_beacon) : + runSelectURL(url, [], resolve_to_config)); + const object = object_constructor(id); + return buildRemoteContextForObject(object, uuid, html); +} + +function attachPotentiallyOpaqueContext( + generator_api, resolve_to_config, ad_with_size, requested_size, + automatic_beacon, frame_constructor, html, headers, origin, + num_components) { + generator_api = generator_api.toLowerCase(); + if (generator_api == 'fledge' || generator_api == 'sharedstorage') { + return attachOpaqueContext( + generator_api, resolve_to_config, ad_with_size, requested_size, + automatic_beacon, frame_constructor, html, headers, origin, + num_components); + } else { + return attachContext(frame_constructor, html, headers, origin); + } +} + +function attachFrameContext( + element_name, generator_api, resolve_to_config, ad_with_size, + requested_size, automatic_beacon, html, headers, attributes, origin, + num_components) { + frame_constructor = (id) => { + frame = document.createElement(element_name); + attributes.forEach(attribute => { + frame.setAttribute(attribute[0], attribute[1]); + }); + if (element_name == "iframe") { + frame.src = id; + } else if (id instanceof FencedFrameConfig) { + frame.config = id; + } else { + const config = new FencedFrameConfig(id); + frame.config = config; + } + document.body.append(frame); + return frame; + }; + return attachPotentiallyOpaqueContext( + generator_api, resolve_to_config, ad_with_size, requested_size, + automatic_beacon, frame_constructor, html, headers, origin, + num_components); +} + +function replaceFrameContext(frame_proxy, { + generator_api = '', + resolve_to_config = false, + ad_with_size = false, + requested_size = null, + automatic_beacon = false, + html = '', + headers = [], + origin = '' +} = {}) { + frame_constructor = (id) => { + if (frame_proxy.element.nodeName == "IFRAME") { + frame_proxy.element.src = id; + } else if (id instanceof FencedFrameConfig) { + frame_proxy.element.config = id; + } else { + const config = new FencedFrameConfig(id); + frame_proxy.element.config = config; + } + return frame_proxy.element; + }; + return attachPotentiallyOpaqueContext( + generator_api, resolve_to_config, ad_with_size, requested_size, + automatic_beacon, frame_constructor, html, headers, origin); +} + +// Attach a fenced frame that waits for scripts to execute. +// Takes as input a(n optional) dictionary of configs: +// - generator_api: the name of the API that should generate the urn/config. +// Supports (case-insensitive) "fledge" and "sharedstorage", or any other +// value as a default. +// If you generate a urn, then you need to await the result of this function. +// - resolve_to_config: whether a config should be used. (currently only works +// for FLEDGE and sharedStorage generator_api) +// - ad_with_size: whether an ad auction is run with size specified for the ads +// and ad components. (currently only works for FLEDGE) +// - requested_size: A 2-element list with the width and height for +// requestedSize in the FLEDGE auction config. This is different from +// ad_with_size, which refers to size information provided alongside the ads +// themselves. +// - automatic_beacon: If true and generator_api = "fledge", an automatic beacon +// will be registered for a top-level navigation after the FLEDGE auction +// completes. +// - html: extra HTML source code to inject into the loaded frame +// - headers: an array of header pairs [[key, value], ...] +// - attributes: an array of attribute pairs to set on the frame [[key, value], +// ...] +// - origin: origin of the url, default to location.origin if not set +// Returns a proxy that acts like the frame HTML element, but with an extra +// function `execute`. See `attachFrameContext` or the README for more details. +function attachFencedFrameContext({ + generator_api = '', + resolve_to_config = false, + ad_with_size = false, + requested_size = null, + automatic_beacon = false, + html = '', + headers = [], + attributes = [], + origin = '', + num_components = 0 +} = {}) { + return attachFrameContext( + 'fencedframe', generator_api, resolve_to_config, ad_with_size, + requested_size, automatic_beacon, html, headers, attributes, origin, + num_components); +} + +// Attach an iframe that waits for scripts to execute. +// See `attachFencedFrameContext` for more details. +function attachIFrameContext({ + generator_api = '', + automatic_beacon = false, + html = '', + headers = [], + attributes = [], + origin = '', + num_components = 0 +} = {}) { + return attachFrameContext( + 'iframe', generator_api, resolve_to_config = false, ad_with_size = false, + requested_size = null, automatic_beacon, html, headers, attributes, + origin, num_components); +} + +// Open a window that waits for scripts to execute. +// Returns a proxy that acts like the window object, but with an extra +// function `execute`. See `attachContext` for more details. +function attachWindowContext({target="_blank", html="", headers=[], origin=""}={}) { + window_constructor = (url) => { + return window.open(url, target); + } + + return attachContext(window_constructor, html, headers, origin); +} + +// Attaches an ad component in a fenced frame. For this to work, this must be +// called in a frame that was generated with attachFrameContext() using the +// Protected Audience API (generator_api: 'fledge'). +function attachComponentFencedFrameContext( + index = 0, {attributes = [], html = ''} = {}) { + const urn = window.fence.getNestedConfigs()[index]; + return attachComponentFrameContext( + index, 'fencedframe', urn, attributes, html); +} + +// Same as attachComponentFencedFrameContext, but in a urn iframe. +function attachComponentIFrameContext( + index = 0, {attributes = [], html = ''} = {}) { + const urn = navigator.adAuctionComponents(index + 1)[index]; + return attachComponentFrameContext(index, 'iframe', urn, attributes, html); +} + +function attachComponentFrameContext( + index, element_name, urn, attributes, html) { + assert_not_equals( + document.getElementById('component_uuid_' + index), null, + 'Component frames can only be attached to frames loaded with ' + + 'attach*FrameContext() with `num_components` set to at least ' + + (index + 1) + '.'); + + let frame = document.createElement(element_name); + attributes.forEach(attribute => { + frame.setAttribute(attribute[0], attribute[1]); + }); + if (element_name == 'iframe') { + frame.src = urn; + } else { + frame.config = urn; + } + document.body.append(frame); + const context_uuid = document.getElementById('component_uuid_' + index).value; + return buildRemoteContextForObject(frame, context_uuid, html); +} + +// Converts a key string into a key uuid using a cryptographic hash function. +// This function only works in secure contexts (HTTPS). +async function stringToStashKey(string) { + // Compute a SHA-256 hash of the input string, and convert it to hex. + const data = new TextEncoder().encode(string); + const digest = await crypto.subtle.digest('SHA-256', data); + const digest_array = Array.from(new Uint8Array(digest)); + const digest_as_hex = digest_array.map(b => b.toString(16).padStart(2, '0')).join(''); + + // UUIDs are structured as 8X-4X-4X-4X-12X. + // Use the first 32 hex digits and ignore the rest. + const digest_slices = [digest_as_hex.slice(0,8), + digest_as_hex.slice(8,12), + digest_as_hex.slice(12,16), + digest_as_hex.slice(16,20), + digest_as_hex.slice(20,32)]; + return digest_slices.join('-'); +} + +// Create a fenced frame. Then navigate it using the given `target`, which can +// be either an urn:uuid or a fenced frame config object. +function attachFencedFrame(target) { + assert_implements( + window.HTMLFencedFrameElement, + 'The HTMLFencedFrameElement should be exposed on the window object'); + + const fenced_frame = document.createElement('fencedframe'); + + if (target instanceof FencedFrameConfig) { + fenced_frame.config = target; + } else { + const config = new FencedFrameConfig(target); + fenced_frame.config = config; + } + + document.body.append(fenced_frame); + return fenced_frame; +} + +function attachIFrame(url) { + const iframe = document.createElement('iframe'); + iframe.src = url; + document.body.append(iframe); + return iframe; +} + +// Reads the value specified by `key` from the key-value store on the server. +async function readValueFromServer(key) { + // Resolve the key if it is a Promise. + key = await key; + + const serverURL = `${STORE_URL}?key=${key}`; + const response = await fetch(serverURL); + if (!response.ok) + throw new Error('An error happened in the server'); + const value = await response.text(); + + // The value is not stored in the server. + if (value === "") + return { status: false }; + + return { status: true, value: value }; +} + +// Convenience wrapper around the above getter that will wait until a value is +// available on the server. +async function nextValueFromServer(key) { + // Resolve the key if it is a Promise. + key = await key; + + while (true) { + // Fetches the test result from the server. + const { status, value } = await readValueFromServer(key); + if (!status) { + // The test result has not been stored yet. Retry after a while. + await new Promise(resolve => setTimeout(resolve, 20)); + continue; + } + + return value; + } +} + +// Checks the automatic beacon data server to see if it has received an +// automatic beacon with a given event type and body. +async function readAutomaticBeaconDataFromServer(event_type, expected_body) { + let serverURL = `${BEACON_URL}`; + const response = await fetch(serverURL + "?" + new URLSearchParams({ + type: event_type, + expected_body: expected_body, + })); + if (!response.ok) + throw new Error('An error happened in the server ' + response.status); + const value = await response.text(); + + // The value is not stored in the server. + if (value === "") + return { status: false }; + + return { status: true, value: value }; +} + +// Convenience wrapper around the above getter that will wait until a value is +// available on the server. The server uses a hash of the concatenated event +// type and beacon data as the key when storing the beacon in the database. To +// retrieve it, we need to supply the endpoint with both pieces of information. +async function nextAutomaticBeacon(event_type, expected_body) { + while (true) { + // Fetches the test result from the server. + const { status, value } = + await readAutomaticBeaconDataFromServer(event_type, expected_body); + if (!status) { + // The test result has not been stored yet. Retry after a while. + await new Promise(resolve => setTimeout(resolve, 20)); + continue; + } + + return value; + } +} + +// Writes `value` for `key` in the key-value store on the server. +async function writeValueToServer(key, value, origin = '') { + // Resolve the key if it is a Promise. + key = await key; + + const serverURL = `${origin}${STORE_URL}?key=${key}&value=${value}`; + await fetch(serverURL, {"mode": "no-cors"}); +} + +// Simulates a user gesture. +async function simulateGesture() { + // Wait until the window size is initialized. + while (window.innerWidth == 0) { + await new Promise(resolve => requestAnimationFrame(resolve)); + } + await test_driver.bless('simulate gesture'); +} + +// Fenced frames are always put in the public IP address space which is the +// least privileged. In case a navigation to a local data: URL or blob: URL +// resource is allowed, they would only be able to fetch things that are *also* +// in the public IP address space. So for the document described by these local +// URLs, we'll set them up to only communicate back to the outer page via +// resources obtained in the public address space. +function createLocalSource(key, url) { + return ` + + + + + +Fenced frame content to test Web Bluetooth + + + + + diff --git a/testing/web-platform/tests/fenced-frame/resources/web-bluetooth-inner.html.headers b/testing/web-platform/tests/fenced-frame/resources/web-bluetooth-inner.html.headers new file mode 100644 index 0000000000..1b63235b7c --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/web-bluetooth-inner.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame diff --git a/testing/web-platform/tests/fenced-frame/resources/web-nfc-inner.https.html b/testing/web-platform/tests/fenced-frame/resources/web-nfc-inner.https.html new file mode 100644 index 0000000000..682805d5d2 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/web-nfc-inner.https.html @@ -0,0 +1,23 @@ + + +Fenced frame content to report the value of Web NFC API + + + + diff --git a/testing/web-platform/tests/fenced-frame/resources/web-nfc-inner.https.html.headers b/testing/web-platform/tests/fenced-frame/resources/web-nfc-inner.https.html.headers new file mode 100644 index 0000000000..1b63235b7c --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/web-nfc-inner.https.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame diff --git a/testing/web-platform/tests/fenced-frame/resources/web-share-inner.html b/testing/web-platform/tests/fenced-frame/resources/web-share-inner.html new file mode 100644 index 0000000000..aada6f04e1 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/web-share-inner.html @@ -0,0 +1,21 @@ + + + + + +Fenced frame content to test Web Share + + + + diff --git a/testing/web-platform/tests/fenced-frame/resources/web-share-inner.html.headers b/testing/web-platform/tests/fenced-frame/resources/web-share-inner.html.headers new file mode 100644 index 0000000000..1b63235b7c --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/web-share-inner.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame diff --git a/testing/web-platform/tests/fenced-frame/resources/window-frameElement-inner.html b/testing/web-platform/tests/fenced-frame/resources/window-frameElement-inner.html new file mode 100644 index 0000000000..897d9a0d59 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/window-frameElement-inner.html @@ -0,0 +1,14 @@ + + +Fenced frame content to report the value of window.frameElement + + + + diff --git a/testing/web-platform/tests/fenced-frame/resources/window-frameElement-inner.html.headers b/testing/web-platform/tests/fenced-frame/resources/window-frameElement-inner.html.headers new file mode 100644 index 0000000000..6247f6d632 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/window-frameElement-inner.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame \ No newline at end of file diff --git a/testing/web-platform/tests/fenced-frame/resources/window-navigation-204-inner.html b/testing/web-platform/tests/fenced-frame/resources/window-navigation-204-inner.html new file mode 100644 index 0000000000..e5e5adef1d --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/window-navigation-204-inner.html @@ -0,0 +1,23 @@ + + + + +Fenced frame content to report the value of window.navigation + + + + diff --git a/testing/web-platform/tests/fenced-frame/resources/window-navigation-204-inner.html.headers b/testing/web-platform/tests/fenced-frame/resources/window-navigation-204-inner.html.headers new file mode 100644 index 0000000000..1b63235b7c --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/window-navigation-204-inner.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame diff --git a/testing/web-platform/tests/fenced-frame/resources/window-outer-dimensions-inner.html b/testing/web-platform/tests/fenced-frame/resources/window-outer-dimensions-inner.html new file mode 100644 index 0000000000..81dee800fc --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/window-outer-dimensions-inner.html @@ -0,0 +1,36 @@ + + +Fenced frame content to report the result of prerendering + + + + diff --git a/testing/web-platform/tests/fenced-frame/resources/window-outer-dimensions-inner.html.headers b/testing/web-platform/tests/fenced-frame/resources/window-outer-dimensions-inner.html.headers new file mode 100644 index 0000000000..6247f6d632 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/window-outer-dimensions-inner.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame \ No newline at end of file diff --git a/testing/web-platform/tests/fenced-frame/resources/window-parent-inner.html b/testing/web-platform/tests/fenced-frame/resources/window-parent-inner.html new file mode 100644 index 0000000000..9008d7d923 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/window-parent-inner.html @@ -0,0 +1,64 @@ + + + +Fenced frame content to report the value of window.parent + + + + diff --git a/testing/web-platform/tests/fenced-frame/resources/window-parent-inner.html.headers b/testing/web-platform/tests/fenced-frame/resources/window-parent-inner.html.headers new file mode 100644 index 0000000000..6247f6d632 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/window-parent-inner.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame \ No newline at end of file diff --git a/testing/web-platform/tests/fenced-frame/resources/window-top-inner.html b/testing/web-platform/tests/fenced-frame/resources/window-top-inner.html new file mode 100644 index 0000000000..ddc30bf71b --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/window-top-inner.html @@ -0,0 +1,63 @@ + + + +Fenced frame content to report the value of window.top + + + + diff --git a/testing/web-platform/tests/fenced-frame/resources/window-top-inner.html.headers b/testing/web-platform/tests/fenced-frame/resources/window-top-inner.html.headers new file mode 100644 index 0000000000..6247f6d632 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/window-top-inner.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame \ No newline at end of file diff --git a/testing/web-platform/tests/fenced-frame/revoke-nested-fenced-frame-in-iframe-navigation.https.html b/testing/web-platform/tests/fenced-frame/revoke-nested-fenced-frame-in-iframe-navigation.https.html new file mode 100644 index 0000000000..3a44c3c2f4 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/revoke-nested-fenced-frame-in-iframe-navigation.https.html @@ -0,0 +1,75 @@ + +Test that window.fence.disableUntrustedNetwork disables + embedder-initiated navigation of FF -> IF -> FF. + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/revoke-nested-fenced-frame-navigation.https.html b/testing/web-platform/tests/fenced-frame/revoke-nested-fenced-frame-navigation.https.html new file mode 100644 index 0000000000..b80350a588 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/revoke-nested-fenced-frame-navigation.https.html @@ -0,0 +1,50 @@ + +Test that window.fence.disableUntrustedNetwork disables + embedder-initiated navigation of nested fenced frames. + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/revoke-unfenced-top-navigation.https.html b/testing/web-platform/tests/fenced-frame/revoke-unfenced-top-navigation.https.html new file mode 100644 index 0000000000..873404768f --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/revoke-unfenced-top-navigation.https.html @@ -0,0 +1,47 @@ + +Test that window.fence.disableUntrustedNetwork disables + _unfencedTop navigations. + + + + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/sandbox-attribute.https.html b/testing/web-platform/tests/fenced-frame/sandbox-attribute.https.html new file mode 100644 index 0000000000..1458145e43 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/sandbox-attribute.https.html @@ -0,0 +1,63 @@ + +Test fenced frame sandbox attribute. + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/sandbox-mandatory-flags.https.html b/testing/web-platform/tests/fenced-frame/sandbox-mandatory-flags.https.html new file mode 100644 index 0000000000..57a5bc49cf --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/sandbox-mandatory-flags.https.html @@ -0,0 +1,136 @@ + + +Test of sandbox mandatory flags + + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/sandboxed-features-alert.https.html b/testing/web-platform/tests/fenced-frame/sandboxed-features-alert.https.html new file mode 100644 index 0000000000..6d3f83208d --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/sandboxed-features-alert.https.html @@ -0,0 +1,14 @@ + +Test of sandboxed features - alert + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/sandboxed-features-confirm.https.html b/testing/web-platform/tests/fenced-frame/sandboxed-features-confirm.https.html new file mode 100644 index 0000000000..bb55f15ff0 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/sandboxed-features-confirm.https.html @@ -0,0 +1,15 @@ + +Test of sandbox features - confirm + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/sandboxed-features-documentdomain.https.html b/testing/web-platform/tests/fenced-frame/sandboxed-features-documentdomain.https.html new file mode 100644 index 0000000000..e00ab23980 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/sandboxed-features-documentdomain.https.html @@ -0,0 +1,14 @@ + +Test of sandboxed features - document.domain + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/sandboxed-features-pointerlock.https.html b/testing/web-platform/tests/fenced-frame/sandboxed-features-pointerlock.https.html new file mode 100644 index 0000000000..af598798b2 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/sandboxed-features-pointerlock.https.html @@ -0,0 +1,14 @@ + +Test of sandboxed features - pointer lock + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/sandboxed-features-presentation-request.https.html b/testing/web-platform/tests/fenced-frame/sandboxed-features-presentation-request.https.html new file mode 100644 index 0000000000..7f9b1d7bd6 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/sandboxed-features-presentation-request.https.html @@ -0,0 +1,14 @@ + +Test of sandboxed features - PresentationRequest + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/sandboxed-features-printdialog.https.html b/testing/web-platform/tests/fenced-frame/sandboxed-features-printdialog.https.html new file mode 100644 index 0000000000..b03f7a22d8 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/sandboxed-features-printdialog.https.html @@ -0,0 +1,14 @@ + +Test of sandboxed features - print + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/sandboxed-features-prompt.https.html b/testing/web-platform/tests/fenced-frame/sandboxed-features-prompt.https.html new file mode 100644 index 0000000000..1207f4a765 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/sandboxed-features-prompt.https.html @@ -0,0 +1,14 @@ + +Test of sandboxed features - prompt + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/sandboxed-features-screen-orientation-lock.https.html b/testing/web-platform/tests/fenced-frame/sandboxed-features-screen-orientation-lock.https.html new file mode 100644 index 0000000000..4e80d92e1d --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/sandboxed-features-screen-orientation-lock.https.html @@ -0,0 +1,14 @@ + +Test of sandboxed features - screen.orientation.lock + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/script-focus.https.html b/testing/web-platform/tests/fenced-frame/script-focus.https.html new file mode 100644 index 0000000000..0bef98219b --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/script-focus.https.html @@ -0,0 +1,206 @@ + +Test Script-Based Focus for Fenced Frames + + + + + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/scroll-into-view.https.html b/testing/web-platform/tests/fenced-frame/scroll-into-view.https.html new file mode 100644 index 0000000000..5188f39c69 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/scroll-into-view.https.html @@ -0,0 +1,44 @@ + +Test scrollIntoView() inside a fenced frame + + + + + + + + +
+ + diff --git a/testing/web-platform/tests/fenced-frame/selecturl-flexible-size.https.html b/testing/web-platform/tests/fenced-frame/selecturl-flexible-size.https.html new file mode 100644 index 0000000000..6b1a07e73a --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/selecturl-flexible-size.https.html @@ -0,0 +1,56 @@ + +Test frame size behavior in selectURL fenced frames. + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/self-urn-navigation.https.html b/testing/web-platform/tests/fenced-frame/self-urn-navigation.https.html new file mode 100644 index 0000000000..4b1e989e8a --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/self-urn-navigation.https.html @@ -0,0 +1,37 @@ + +Test that fenced frame-initiated self urn navigations fail. + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/serviceWorker-dedicated-worker.https.html b/testing/web-platform/tests/fenced-frame/serviceWorker-dedicated-worker.https.html new file mode 100644 index 0000000000..92533e3873 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/serviceWorker-dedicated-worker.https.html @@ -0,0 +1,71 @@ + +Service Worker: Check if dedicated workers are controlled + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/serviceWorker-frameType.https.html b/testing/web-platform/tests/fenced-frame/serviceWorker-frameType.https.html new file mode 100644 index 0000000000..ac0bc07f3d --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/serviceWorker-frameType.https.html @@ -0,0 +1,33 @@ + +Service Worker: Clients.matchAll with includeUncontrolled + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/serviceWorker-push.https.html b/testing/web-platform/tests/fenced-frame/serviceWorker-push.https.html new file mode 100644 index 0000000000..cb460d161e --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/serviceWorker-push.https.html @@ -0,0 +1,62 @@ + + + +Service Worker: Push Messaging Test + + + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/set-automatic-beacon.https.html b/testing/web-platform/tests/fenced-frame/set-automatic-beacon.https.html new file mode 100644 index 0000000000..c178370739 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/set-automatic-beacon.https.html @@ -0,0 +1,54 @@ + +Test window.fence.setReportEventDataForAutomaticBeacons + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/setting-null-config-navigates-to-about-blank.https.html b/testing/web-platform/tests/fenced-frame/setting-null-config-navigates-to-about-blank.https.html new file mode 100644 index 0000000000..2595fd64c9 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/setting-null-config-navigates-to-about-blank.https.html @@ -0,0 +1,44 @@ + + + + + + + +Test fenced frame null config installation triggers about:blank navigation. + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/show-directory-picker.https.html b/testing/web-platform/tests/fenced-frame/show-directory-picker.https.html new file mode 100644 index 0000000000..ae4494f51b --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/show-directory-picker.https.html @@ -0,0 +1,31 @@ + +showDirectoryPicker API test + + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/show-open-file-picker.https.html b/testing/web-platform/tests/fenced-frame/show-open-file-picker.https.html new file mode 100644 index 0000000000..2f99fdfb3b --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/show-open-file-picker.https.html @@ -0,0 +1,32 @@ + +showOpenFilePicker API test + + + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/storage-partitioning.https.html b/testing/web-platform/tests/fenced-frame/storage-partitioning.https.html new file mode 100644 index 0000000000..36b4395339 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/storage-partitioning.https.html @@ -0,0 +1,188 @@ + +Test storage partitioning in fenced frames + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/subframe-loading.https.html b/testing/web-platform/tests/fenced-frame/subframe-loading.https.html new file mode 100644 index 0000000000..758bdd87fa --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/subframe-loading.https.html @@ -0,0 +1,30 @@ + +Test Subframe Loading Disabler + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/unique-cookie-partition.https.html b/testing/web-platform/tests/fenced-frame/unique-cookie-partition.https.html new file mode 100644 index 0000000000..8ecd56ffc3 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/unique-cookie-partition.https.html @@ -0,0 +1,55 @@ + +Test cookies accessed from a Fenced Frame Tree + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/user-activation.https.html b/testing/web-platform/tests/fenced-frame/user-activation.https.html new file mode 100644 index 0000000000..3ca0dca49b --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/user-activation.https.html @@ -0,0 +1,95 @@ + +Test that user activation propagation is fenced. + + + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/visual-viewport.https.html b/testing/web-platform/tests/fenced-frame/visual-viewport.https.html new file mode 100644 index 0000000000..7870f11e8c --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/visual-viewport.https.html @@ -0,0 +1,82 @@ + +Test visualViewport inside a fenced frame. + + + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/web-bluetooth.https.html b/testing/web-platform/tests/fenced-frame/web-bluetooth.https.html new file mode 100644 index 0000000000..88bbd6ec37 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/web-bluetooth.https.html @@ -0,0 +1,26 @@ + +Test of Web Bluetooth API + + + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/web-nfc.https.html b/testing/web-platform/tests/fenced-frame/web-nfc.https.html new file mode 100644 index 0000000000..c7de9d81f9 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/web-nfc.https.html @@ -0,0 +1,28 @@ + +Test Web NFC API + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/web-share.https.html b/testing/web-platform/tests/fenced-frame/web-share.https.html new file mode 100644 index 0000000000..13d182b2d1 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/web-share.https.html @@ -0,0 +1,26 @@ + +Test of Web Share + + + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/web-usb.https.html b/testing/web-platform/tests/fenced-frame/web-usb.https.html new file mode 100644 index 0000000000..3156f68ea7 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/web-usb.https.html @@ -0,0 +1,29 @@ + +Test WebUSB navigator.usb.requestDevice() + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/window-close.https.html b/testing/web-platform/tests/fenced-frame/window-close.https.html new file mode 100644 index 0000000000..b581a0324c --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/window-close.https.html @@ -0,0 +1,21 @@ + +Test window.close has no effect + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/window-frameElement.https.html b/testing/web-platform/tests/fenced-frame/window-frameElement.https.html new file mode 100644 index 0000000000..bd4532b1eb --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/window-frameElement.https.html @@ -0,0 +1,21 @@ + +Test window.parent + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/window-navigation-204.https.html b/testing/web-platform/tests/fenced-frame/window-navigation-204.https.html new file mode 100644 index 0000000000..6722060330 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/window-navigation-204.https.html @@ -0,0 +1,24 @@ + +Test window.navigation.204 + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/window-outer-dimensions.https.html b/testing/web-platform/tests/fenced-frame/window-outer-dimensions.https.html new file mode 100644 index 0000000000..c6a64ef193 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/window-outer-dimensions.https.html @@ -0,0 +1,53 @@ + +Test window.prompt + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/window-parent.https.html b/testing/web-platform/tests/fenced-frame/window-parent.https.html new file mode 100644 index 0000000000..c2f3604050 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/window-parent.https.html @@ -0,0 +1,44 @@ + +Test window.parent + + + + + + + + + + diff --git a/testing/web-platform/tests/fenced-frame/window-top.https.html b/testing/web-platform/tests/fenced-frame/window-top.https.html new file mode 100644 index 0000000000..9a8f39f08b --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/window-top.https.html @@ -0,0 +1,44 @@ + +Test window.top + + + + + + + + + + -- cgit v1.2.3