From 36d22d82aa202bb199967e9512281e9a53db42c9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 21:33:14 +0200 Subject: Adding upstream version 115.7.0esr. Signed-off-by: Daniel Baumann --- testing/web-platform/tests/portals/META.yml | 4 + testing/web-platform/tests/portals/README.md | 9 + .../tests/portals/about-blank-cannot-host.html | 18 ++ .../tests/portals/csp/frame-ancestors.sub.html | 13 ++ .../tests/portals/csp/frame-src.sub.html | 49 ++++++ .../tests/portals/csp/resources/frame-src.sub.html | 4 + .../csp/resources/frame-src.sub.html.sub.headers | 2 + ...-manipulation-inside-portal-with-subframes.html | 42 +++++ .../history-manipulation-inside-portal.html | 60 +++++++ .../portals/history/resources/inner-iframe.html | 13 ++ .../portals/history/resources/portal-harness.js | 30 ++++ ...rtal-manipulate-history-with-subframes.sub.html | 83 +++++++++ .../resources/portal-manipulate-history.html | 66 +++++++ .../history/resources/run-test-in-portal.js | 16 ++ ...alelement-event-handler-content-attributes.html | 27 +++ .../tests/portals/idlharness.window.js | 18 ++ .../portals/no-portal-in-sandboxed-popup.html | 17 ++ .../tests/portals/portal-activate-data.html | 94 ++++++++++ .../tests/portals/portal-activate-default.html | 58 +++++++ .../portals/portal-activate-event-constructor.html | 25 +++ .../tests/portals/portal-activate-event.html | 41 +++++ .../tests/portals/portal-non-http-navigation.html | 37 ++++ .../tests/portals/portal-onload-event.html | 16 ++ .../portals-activate-empty-browsing-context.html | 26 +++ .../portals/portals-activate-inside-iframe.html | 21 +++ .../portals/portals-activate-inside-portal.html | 18 ++ .../portals/portals-activate-network-error.html | 18 ++ .../portals-activate-no-browsing-context.html | 10 ++ .../tests/portals/portals-activate-resolution.html | 19 +++ .../tests/portals/portals-activate-twice.html | 24 +++ .../portals/portals-activate-while-unloading.html | 70 ++++++++ .../tests/portals/portals-adopt-predecessor.html | 82 +++++++++ .../web-platform/tests/portals/portals-api.html | 11 ++ .../tests/portals/portals-close-window.html | 20 +++ .../portals/portals-cross-origin-load.sub.html | 16 ++ .../tests/portals/portals-focus.sub.html | 184 ++++++++++++++++++++ .../tests/portals/portals-host-exposure.sub.html | 40 +++++ .../portals-host-hidden-after-activation.html | 30 ++++ .../tests/portals/portals-host-null.html | 10 ++ .../portals/portals-host-post-message.sub.html | 138 +++++++++++++++ .../portals/portals-navigate-after-adoption.html | 41 +++++ .../web-platform/tests/portals/portals-nested.html | 17 ++ .../tests/portals/portals-no-frame-crash.html | 30 ++++ .../tests/portals/portals-post-message.sub.html | 189 +++++++++++++++++++++ .../portals/portals-referrer-inherit-header.html | 23 +++ .../portals-referrer-inherit-header.html.headers | 1 + .../portals/portals-referrer-inherit-meta.html | 24 +++ .../tests/portals/portals-referrer.html | 61 +++++++ .../tests/portals/portals-rendering.html | 22 +++ .../tests/portals/portals-repeated-activate.html | 11 ++ .../portals/portals-set-src-after-activate.html | 38 +++++ .../tests/portals/predecessor-fires-unload.html | 40 +++++ .../portals/references/portals-rendering.html | 5 + .../portals/resources/attempt-portal-load.html | 11 ++ .../tests/portals/resources/blank-host.html | 8 + .../tests/portals/resources/eval-portal.html | 10 ++ .../resources/focus-page-with-autofocus.html | 23 +++ .../portals/resources/focus-page-with-button.html | 35 ++++ .../focus-page-with-x-origin-iframe.sub.html | 28 +++ .../tests/portals/resources/invalid.asis | 1 + .../tests/portals/resources/open-blank-host.js | 14 ++ .../portal-activate-broadcastchannel.html | 8 + .../resources/portal-activate-data-portal.html | 9 + .../resources/portal-activate-event-portal.html | 21 +++ .../resources/portal-activate-in-handler.html | 51 ++++++ .../resources/portal-activate-inside-portal.html | 11 ++ .../resources/portal-activate-twice-window-1.html | 12 ++ .../resources/portal-activate-twice-window-2.html | 22 +++ .../portals/resources/portal-close-window.html | 7 + .../resources/portal-embed-and-activate.html | 15 ++ .../portal-host-cross-origin-navigate.sub.html | 7 + ...portal-host-hidden-after-activation-portal.html | 14 ++ .../portal-host-post-message-after-activate.html | 19 +++ .../portal-host-post-message-navigate-1.html | 5 + .../portal-host-post-message-navigate-2.html | 4 + .../portal-host-post-message-x-origin.html | 4 + .../resources/portal-host-post-message.html | 51 ++++++ .../tests/portals/resources/portal-host.html | 11 ++ .../portals/resources/portal-inside-iframe.html | 4 + .../portal-post-message-after-activate-window.html | 23 +++ ...portal-post-message-before-activate-portal.html | 24 +++ ...portal-post-message-before-activate-window.html | 13 ++ ...portal-post-message-during-activate-window.html | 21 +++ .../resources/portal-post-message-portal.html | 29 ++++ .../portal-post-message-x-origin-portal.html | 11 ++ .../resources/portal-repeated-activate-window.html | 20 +++ .../portals-adopt-predecessor-portal.html | 77 +++++++++ .../resources/portals-adopt-predecessor.html | 20 +++ .../portals/resources/portals-nested-portal.html | 9 + .../resources/portals-rendering-portal.html | 8 + .../resources/postmessage-referrer.sub.html | 8 + .../predecessor-fires-unload-watch-unload.html | 25 +++ ...le-portal-adopts-and-activates-predecessor.html | 6 + .../simple-portal-adopts-predecessor.html | 7 + .../tests/portals/resources/simple-portal.html | 6 + .../tests/portals/resources/stash-utils.sub.js | 43 +++++ .../tests/portals/xfo/portals-xfo-deny.sub.html | 43 +++++ .../tests/portals/xfo/portals-xfo-sameorigin.html | 18 ++ .../tests/portals/xfo/resources/xfo-deny.asis | 8 + .../portals/xfo/resources/xfo-sameorigin.asis | 8 + 100 files changed, 2813 insertions(+) create mode 100644 testing/web-platform/tests/portals/META.yml create mode 100644 testing/web-platform/tests/portals/README.md create mode 100644 testing/web-platform/tests/portals/about-blank-cannot-host.html create mode 100644 testing/web-platform/tests/portals/csp/frame-ancestors.sub.html create mode 100644 testing/web-platform/tests/portals/csp/frame-src.sub.html create mode 100644 testing/web-platform/tests/portals/csp/resources/frame-src.sub.html create mode 100644 testing/web-platform/tests/portals/csp/resources/frame-src.sub.html.sub.headers create mode 100644 testing/web-platform/tests/portals/history/history-manipulation-inside-portal-with-subframes.html create mode 100644 testing/web-platform/tests/portals/history/history-manipulation-inside-portal.html create mode 100644 testing/web-platform/tests/portals/history/resources/inner-iframe.html create mode 100644 testing/web-platform/tests/portals/history/resources/portal-harness.js create mode 100644 testing/web-platform/tests/portals/history/resources/portal-manipulate-history-with-subframes.sub.html create mode 100644 testing/web-platform/tests/portals/history/resources/portal-manipulate-history.html create mode 100644 testing/web-platform/tests/portals/history/resources/run-test-in-portal.js create mode 100644 testing/web-platform/tests/portals/htmlportalelement-event-handler-content-attributes.html create mode 100644 testing/web-platform/tests/portals/idlharness.window.js create mode 100644 testing/web-platform/tests/portals/no-portal-in-sandboxed-popup.html create mode 100644 testing/web-platform/tests/portals/portal-activate-data.html create mode 100644 testing/web-platform/tests/portals/portal-activate-default.html create mode 100644 testing/web-platform/tests/portals/portal-activate-event-constructor.html create mode 100644 testing/web-platform/tests/portals/portal-activate-event.html create mode 100644 testing/web-platform/tests/portals/portal-non-http-navigation.html create mode 100644 testing/web-platform/tests/portals/portal-onload-event.html create mode 100644 testing/web-platform/tests/portals/portals-activate-empty-browsing-context.html create mode 100644 testing/web-platform/tests/portals/portals-activate-inside-iframe.html create mode 100644 testing/web-platform/tests/portals/portals-activate-inside-portal.html create mode 100644 testing/web-platform/tests/portals/portals-activate-network-error.html create mode 100644 testing/web-platform/tests/portals/portals-activate-no-browsing-context.html create mode 100644 testing/web-platform/tests/portals/portals-activate-resolution.html create mode 100644 testing/web-platform/tests/portals/portals-activate-twice.html create mode 100644 testing/web-platform/tests/portals/portals-activate-while-unloading.html create mode 100644 testing/web-platform/tests/portals/portals-adopt-predecessor.html create mode 100644 testing/web-platform/tests/portals/portals-api.html create mode 100644 testing/web-platform/tests/portals/portals-close-window.html create mode 100644 testing/web-platform/tests/portals/portals-cross-origin-load.sub.html create mode 100644 testing/web-platform/tests/portals/portals-focus.sub.html create mode 100644 testing/web-platform/tests/portals/portals-host-exposure.sub.html create mode 100644 testing/web-platform/tests/portals/portals-host-hidden-after-activation.html create mode 100644 testing/web-platform/tests/portals/portals-host-null.html create mode 100644 testing/web-platform/tests/portals/portals-host-post-message.sub.html create mode 100644 testing/web-platform/tests/portals/portals-navigate-after-adoption.html create mode 100644 testing/web-platform/tests/portals/portals-nested.html create mode 100644 testing/web-platform/tests/portals/portals-no-frame-crash.html create mode 100644 testing/web-platform/tests/portals/portals-post-message.sub.html create mode 100644 testing/web-platform/tests/portals/portals-referrer-inherit-header.html create mode 100644 testing/web-platform/tests/portals/portals-referrer-inherit-header.html.headers create mode 100644 testing/web-platform/tests/portals/portals-referrer-inherit-meta.html create mode 100644 testing/web-platform/tests/portals/portals-referrer.html create mode 100644 testing/web-platform/tests/portals/portals-rendering.html create mode 100644 testing/web-platform/tests/portals/portals-repeated-activate.html create mode 100644 testing/web-platform/tests/portals/portals-set-src-after-activate.html create mode 100644 testing/web-platform/tests/portals/predecessor-fires-unload.html create mode 100644 testing/web-platform/tests/portals/references/portals-rendering.html create mode 100644 testing/web-platform/tests/portals/resources/attempt-portal-load.html create mode 100644 testing/web-platform/tests/portals/resources/blank-host.html create mode 100644 testing/web-platform/tests/portals/resources/eval-portal.html create mode 100644 testing/web-platform/tests/portals/resources/focus-page-with-autofocus.html create mode 100644 testing/web-platform/tests/portals/resources/focus-page-with-button.html create mode 100644 testing/web-platform/tests/portals/resources/focus-page-with-x-origin-iframe.sub.html create mode 100644 testing/web-platform/tests/portals/resources/invalid.asis create mode 100644 testing/web-platform/tests/portals/resources/open-blank-host.js create mode 100644 testing/web-platform/tests/portals/resources/portal-activate-broadcastchannel.html create mode 100644 testing/web-platform/tests/portals/resources/portal-activate-data-portal.html create mode 100644 testing/web-platform/tests/portals/resources/portal-activate-event-portal.html create mode 100644 testing/web-platform/tests/portals/resources/portal-activate-in-handler.html create mode 100644 testing/web-platform/tests/portals/resources/portal-activate-inside-portal.html create mode 100644 testing/web-platform/tests/portals/resources/portal-activate-twice-window-1.html create mode 100644 testing/web-platform/tests/portals/resources/portal-activate-twice-window-2.html create mode 100644 testing/web-platform/tests/portals/resources/portal-close-window.html create mode 100644 testing/web-platform/tests/portals/resources/portal-embed-and-activate.html create mode 100644 testing/web-platform/tests/portals/resources/portal-host-cross-origin-navigate.sub.html create mode 100644 testing/web-platform/tests/portals/resources/portal-host-hidden-after-activation-portal.html create mode 100644 testing/web-platform/tests/portals/resources/portal-host-post-message-after-activate.html create mode 100644 testing/web-platform/tests/portals/resources/portal-host-post-message-navigate-1.html create mode 100644 testing/web-platform/tests/portals/resources/portal-host-post-message-navigate-2.html create mode 100644 testing/web-platform/tests/portals/resources/portal-host-post-message-x-origin.html create mode 100644 testing/web-platform/tests/portals/resources/portal-host-post-message.html create mode 100644 testing/web-platform/tests/portals/resources/portal-host.html create mode 100644 testing/web-platform/tests/portals/resources/portal-inside-iframe.html create mode 100644 testing/web-platform/tests/portals/resources/portal-post-message-after-activate-window.html create mode 100644 testing/web-platform/tests/portals/resources/portal-post-message-before-activate-portal.html create mode 100644 testing/web-platform/tests/portals/resources/portal-post-message-before-activate-window.html create mode 100644 testing/web-platform/tests/portals/resources/portal-post-message-during-activate-window.html create mode 100644 testing/web-platform/tests/portals/resources/portal-post-message-portal.html create mode 100644 testing/web-platform/tests/portals/resources/portal-post-message-x-origin-portal.html create mode 100644 testing/web-platform/tests/portals/resources/portal-repeated-activate-window.html create mode 100644 testing/web-platform/tests/portals/resources/portals-adopt-predecessor-portal.html create mode 100644 testing/web-platform/tests/portals/resources/portals-adopt-predecessor.html create mode 100644 testing/web-platform/tests/portals/resources/portals-nested-portal.html create mode 100644 testing/web-platform/tests/portals/resources/portals-rendering-portal.html create mode 100644 testing/web-platform/tests/portals/resources/postmessage-referrer.sub.html create mode 100644 testing/web-platform/tests/portals/resources/predecessor-fires-unload-watch-unload.html create mode 100644 testing/web-platform/tests/portals/resources/simple-portal-adopts-and-activates-predecessor.html create mode 100644 testing/web-platform/tests/portals/resources/simple-portal-adopts-predecessor.html create mode 100644 testing/web-platform/tests/portals/resources/simple-portal.html create mode 100644 testing/web-platform/tests/portals/resources/stash-utils.sub.js create mode 100644 testing/web-platform/tests/portals/xfo/portals-xfo-deny.sub.html create mode 100644 testing/web-platform/tests/portals/xfo/portals-xfo-sameorigin.html create mode 100644 testing/web-platform/tests/portals/xfo/resources/xfo-deny.asis create mode 100644 testing/web-platform/tests/portals/xfo/resources/xfo-sameorigin.asis (limited to 'testing/web-platform/tests/portals') diff --git a/testing/web-platform/tests/portals/META.yml b/testing/web-platform/tests/portals/META.yml new file mode 100644 index 0000000000..2b3241dd18 --- /dev/null +++ b/testing/web-platform/tests/portals/META.yml @@ -0,0 +1,4 @@ +spec: https://wicg.github.io/portals/ +suggested_reviewers: + - jeremyroman + - lucasgadani diff --git a/testing/web-platform/tests/portals/README.md b/testing/web-platform/tests/portals/README.md new file mode 100644 index 0000000000..29134d490f --- /dev/null +++ b/testing/web-platform/tests/portals/README.md @@ -0,0 +1,9 @@ +# Portals + +This directory contains tests for the portals feature, which seeks to enable +seamless navigation. For more information, see: + +* https://github.com/WICG/portals +* https://wicg.github.io/portals/ + +This feature is currently in early development. diff --git a/testing/web-platform/tests/portals/about-blank-cannot-host.html b/testing/web-platform/tests/portals/about-blank-cannot-host.html new file mode 100644 index 0000000000..c43fbc93ba --- /dev/null +++ b/testing/web-platform/tests/portals/about-blank-cannot-host.html @@ -0,0 +1,18 @@ + + + + diff --git a/testing/web-platform/tests/portals/csp/frame-ancestors.sub.html b/testing/web-platform/tests/portals/csp/frame-ancestors.sub.html new file mode 100644 index 0000000000..096ed00c7a --- /dev/null +++ b/testing/web-platform/tests/portals/csp/frame-ancestors.sub.html @@ -0,0 +1,13 @@ + + + + + + + Blocked portals are reported correctly + + + + + + diff --git a/testing/web-platform/tests/portals/csp/frame-src.sub.html b/testing/web-platform/tests/portals/csp/frame-src.sub.html new file mode 100644 index 0000000000..13d9e79667 --- /dev/null +++ b/testing/web-platform/tests/portals/csp/frame-src.sub.html @@ -0,0 +1,49 @@ + +Tests that portals respect the frame-src + + + + + diff --git a/testing/web-platform/tests/portals/csp/resources/frame-src.sub.html b/testing/web-platform/tests/portals/csp/resources/frame-src.sub.html new file mode 100644 index 0000000000..c4f742a643 --- /dev/null +++ b/testing/web-platform/tests/portals/csp/resources/frame-src.sub.html @@ -0,0 +1,4 @@ + + +

Content Security Policy header containing "frame-src {{GET[frame_src_policy]}}"

+ diff --git a/testing/web-platform/tests/portals/csp/resources/frame-src.sub.html.sub.headers b/testing/web-platform/tests/portals/csp/resources/frame-src.sub.html.sub.headers new file mode 100644 index 0000000000..d50520cd39 --- /dev/null +++ b/testing/web-platform/tests/portals/csp/resources/frame-src.sub.html.sub.headers @@ -0,0 +1,2 @@ +Content-Type: text/html; charset=UTF-8 +Content-Security-Policy: frame-src {{GET[frame_src_policy]}} diff --git a/testing/web-platform/tests/portals/history/history-manipulation-inside-portal-with-subframes.html b/testing/web-platform/tests/portals/history/history-manipulation-inside-portal-with-subframes.html new file mode 100644 index 0000000000..cb4c8d0f91 --- /dev/null +++ b/testing/web-platform/tests/portals/history/history-manipulation-inside-portal-with-subframes.html @@ -0,0 +1,42 @@ + + + + + + + diff --git a/testing/web-platform/tests/portals/history/history-manipulation-inside-portal.html b/testing/web-platform/tests/portals/history/history-manipulation-inside-portal.html new file mode 100644 index 0000000000..d4b0cf4db9 --- /dev/null +++ b/testing/web-platform/tests/portals/history/history-manipulation-inside-portal.html @@ -0,0 +1,60 @@ + + + + + + + diff --git a/testing/web-platform/tests/portals/history/resources/inner-iframe.html b/testing/web-platform/tests/portals/history/resources/inner-iframe.html new file mode 100644 index 0000000000..5c6daa22a5 --- /dev/null +++ b/testing/web-platform/tests/portals/history/resources/inner-iframe.html @@ -0,0 +1,13 @@ + + + + diff --git a/testing/web-platform/tests/portals/history/resources/portal-harness.js b/testing/web-platform/tests/portals/history/resources/portal-harness.js new file mode 100644 index 0000000000..fa8c761afb --- /dev/null +++ b/testing/web-platform/tests/portals/history/resources/portal-harness.js @@ -0,0 +1,30 @@ +// We don't have the test harness in this context, so we roll our own +// which communicates with our host which is actually running the tests. + +window.onload = async () => { + let urlParams = new URLSearchParams(window.location.search); + let testName = urlParams.get('testName'); + let testFn = window[testName]; + if (!testFn) { + window.portalHost.postMessage('Missing test: ' + testName); + return; + } + + // The document load event is not finished at this point, so navigations + // would be done with replacement. This interferes with our tests. We wait + // for the next task before navigating to avoid this. + await new Promise((resolve) => { window.setTimeout(resolve); }); + + try { + await testFn(); + window.portalHost.postMessage('Passed'); + } catch (e) { + window.portalHost.postMessage( + 'Failed: ' + e.name + ': ' + e.message); + } +}; + +function assert(condition, message) { + if (!condition) + throw new Error('Assertion failed: ' + message); +} diff --git a/testing/web-platform/tests/portals/history/resources/portal-manipulate-history-with-subframes.sub.html b/testing/web-platform/tests/portals/history/resources/portal-manipulate-history-with-subframes.sub.html new file mode 100644 index 0000000000..bab83b444f --- /dev/null +++ b/testing/web-platform/tests/portals/history/resources/portal-manipulate-history-with-subframes.sub.html @@ -0,0 +1,83 @@ + + + + + diff --git a/testing/web-platform/tests/portals/history/resources/portal-manipulate-history.html b/testing/web-platform/tests/portals/history/resources/portal-manipulate-history.html new file mode 100644 index 0000000000..3e25f0e6f2 --- /dev/null +++ b/testing/web-platform/tests/portals/history/resources/portal-manipulate-history.html @@ -0,0 +1,66 @@ + + + + + diff --git a/testing/web-platform/tests/portals/history/resources/run-test-in-portal.js b/testing/web-platform/tests/portals/history/resources/run-test-in-portal.js new file mode 100644 index 0000000000..c982a1fac8 --- /dev/null +++ b/testing/web-platform/tests/portals/history/resources/run-test-in-portal.js @@ -0,0 +1,16 @@ +// This is called from the portal host which is running with the test harness. +// This creates a portal and communicates with our ad hoc test harness in the +// portal context which performs the history manipulation in the portal. We +// confirm that the history manipulation works as expected in the portal. +async function runTestInPortal(portalSrc, testName) { + let portal = document.createElement('portal'); + portal.src = portalSrc + '?testName=' + testName; + let result = await new Promise((resolve) => { + portal.onmessage = (e) => { + resolve(e.data); + }; + document.body.appendChild(portal); + }); + + assert_equals(result, 'Passed'); +} diff --git a/testing/web-platform/tests/portals/htmlportalelement-event-handler-content-attributes.html b/testing/web-platform/tests/portals/htmlportalelement-event-handler-content-attributes.html new file mode 100644 index 0000000000..0836c8c00b --- /dev/null +++ b/testing/web-platform/tests/portals/htmlportalelement-event-handler-content-attributes.html @@ -0,0 +1,27 @@ + + + + diff --git a/testing/web-platform/tests/portals/idlharness.window.js b/testing/web-platform/tests/portals/idlharness.window.js new file mode 100644 index 0000000000..b43d17dc56 --- /dev/null +++ b/testing/web-platform/tests/portals/idlharness.window.js @@ -0,0 +1,18 @@ +// META: script=/resources/WebIDLParser.js +// META: script=/resources/idlharness.js + +// https://wicg.github.io/portals/ + +'use strict'; + +idl_test( + ['portals'], + ['html', 'dom'], + async idl_array => { + idl_array.add_objects({ + HTMLPortalElement: ['document.createElement("portal")'], + PortalHost: ['window.portalHost'], + PortalActivateEvent: ['new PortalActivateEvent("portalactivate")'], + }); + } +); diff --git a/testing/web-platform/tests/portals/no-portal-in-sandboxed-popup.html b/testing/web-platform/tests/portals/no-portal-in-sandboxed-popup.html new file mode 100644 index 0000000000..b26b836467 --- /dev/null +++ b/testing/web-platform/tests/portals/no-portal-in-sandboxed-popup.html @@ -0,0 +1,17 @@ + + + + + + diff --git a/testing/web-platform/tests/portals/portal-activate-data.html b/testing/web-platform/tests/portals/portal-activate-data.html new file mode 100644 index 0000000000..54fdca5d8c --- /dev/null +++ b/testing/web-platform/tests/portals/portal-activate-data.html @@ -0,0 +1,94 @@ + +Tests passing of data along with portal activation + + + + + + + diff --git a/testing/web-platform/tests/portals/portal-activate-default.html b/testing/web-platform/tests/portals/portal-activate-default.html new file mode 100644 index 0000000000..b1a8feb1f4 --- /dev/null +++ b/testing/web-platform/tests/portals/portal-activate-default.html @@ -0,0 +1,58 @@ + + + + + + diff --git a/testing/web-platform/tests/portals/portal-activate-event-constructor.html b/testing/web-platform/tests/portals/portal-activate-event-constructor.html new file mode 100644 index 0000000000..1931e8fc86 --- /dev/null +++ b/testing/web-platform/tests/portals/portal-activate-event-constructor.html @@ -0,0 +1,25 @@ + + + + diff --git a/testing/web-platform/tests/portals/portal-activate-event.html b/testing/web-platform/tests/portals/portal-activate-event.html new file mode 100644 index 0000000000..69d8a7c930 --- /dev/null +++ b/testing/web-platform/tests/portals/portal-activate-event.html @@ -0,0 +1,41 @@ + +Tests that the PortalActivateEvent is dispatched when a portal is activated + + + diff --git a/testing/web-platform/tests/portals/portal-non-http-navigation.html b/testing/web-platform/tests/portals/portal-non-http-navigation.html new file mode 100644 index 0000000000..aa02c15efa --- /dev/null +++ b/testing/web-platform/tests/portals/portal-non-http-navigation.html @@ -0,0 +1,37 @@ + +Tests that portal don't navigate to non-http schemes. + + + + + diff --git a/testing/web-platform/tests/portals/portal-onload-event.html b/testing/web-platform/tests/portals/portal-onload-event.html new file mode 100644 index 0000000000..f6b97a814e --- /dev/null +++ b/testing/web-platform/tests/portals/portal-onload-event.html @@ -0,0 +1,16 @@ + +Tests that the load is dispatched when a portal finishes loading. + + + diff --git a/testing/web-platform/tests/portals/portals-activate-empty-browsing-context.html b/testing/web-platform/tests/portals/portals-activate-empty-browsing-context.html new file mode 100644 index 0000000000..0c63e38497 --- /dev/null +++ b/testing/web-platform/tests/portals/portals-activate-empty-browsing-context.html @@ -0,0 +1,26 @@ + + + + + + diff --git a/testing/web-platform/tests/portals/portals-activate-inside-iframe.html b/testing/web-platform/tests/portals/portals-activate-inside-iframe.html new file mode 100644 index 0000000000..f403954096 --- /dev/null +++ b/testing/web-platform/tests/portals/portals-activate-inside-iframe.html @@ -0,0 +1,21 @@ + + + + + + diff --git a/testing/web-platform/tests/portals/portals-activate-inside-portal.html b/testing/web-platform/tests/portals/portals-activate-inside-portal.html new file mode 100644 index 0000000000..19b57b3e42 --- /dev/null +++ b/testing/web-platform/tests/portals/portals-activate-inside-portal.html @@ -0,0 +1,18 @@ + + + + + + diff --git a/testing/web-platform/tests/portals/portals-activate-network-error.html b/testing/web-platform/tests/portals/portals-activate-network-error.html new file mode 100644 index 0000000000..60ee5c902d --- /dev/null +++ b/testing/web-platform/tests/portals/portals-activate-network-error.html @@ -0,0 +1,18 @@ + + + + + + diff --git a/testing/web-platform/tests/portals/portals-activate-no-browsing-context.html b/testing/web-platform/tests/portals/portals-activate-no-browsing-context.html new file mode 100644 index 0000000000..ccf1e9504b --- /dev/null +++ b/testing/web-platform/tests/portals/portals-activate-no-browsing-context.html @@ -0,0 +1,10 @@ + + + + diff --git a/testing/web-platform/tests/portals/portals-activate-resolution.html b/testing/web-platform/tests/portals/portals-activate-resolution.html new file mode 100644 index 0000000000..7094768a4f --- /dev/null +++ b/testing/web-platform/tests/portals/portals-activate-resolution.html @@ -0,0 +1,19 @@ + + + + + diff --git a/testing/web-platform/tests/portals/portals-activate-twice.html b/testing/web-platform/tests/portals/portals-activate-twice.html new file mode 100644 index 0000000000..0eea5465a2 --- /dev/null +++ b/testing/web-platform/tests/portals/portals-activate-twice.html @@ -0,0 +1,24 @@ + + + + diff --git a/testing/web-platform/tests/portals/portals-activate-while-unloading.html b/testing/web-platform/tests/portals/portals-activate-while-unloading.html new file mode 100644 index 0000000000..5abb164b3b --- /dev/null +++ b/testing/web-platform/tests/portals/portals-activate-while-unloading.html @@ -0,0 +1,70 @@ + + + + + + + + + + + + diff --git a/testing/web-platform/tests/portals/portals-adopt-predecessor.html b/testing/web-platform/tests/portals/portals-adopt-predecessor.html new file mode 100644 index 0000000000..04c6196062 --- /dev/null +++ b/testing/web-platform/tests/portals/portals-adopt-predecessor.html @@ -0,0 +1,82 @@ + +Tests that a portal can adopt its predecessor + + + diff --git a/testing/web-platform/tests/portals/portals-api.html b/testing/web-platform/tests/portals/portals-api.html new file mode 100644 index 0000000000..79d2d526bd --- /dev/null +++ b/testing/web-platform/tests/portals/portals-api.html @@ -0,0 +1,11 @@ + +Portals API test + + + + + diff --git a/testing/web-platform/tests/portals/portals-close-window.html b/testing/web-platform/tests/portals/portals-close-window.html new file mode 100644 index 0000000000..e3a66c0bf1 --- /dev/null +++ b/testing/web-platform/tests/portals/portals-close-window.html @@ -0,0 +1,20 @@ + + + + + + diff --git a/testing/web-platform/tests/portals/portals-cross-origin-load.sub.html b/testing/web-platform/tests/portals/portals-cross-origin-load.sub.html new file mode 100644 index 0000000000..04db38a8e9 --- /dev/null +++ b/testing/web-platform/tests/portals/portals-cross-origin-load.sub.html @@ -0,0 +1,16 @@ + + + + + + diff --git a/testing/web-platform/tests/portals/portals-focus.sub.html b/testing/web-platform/tests/portals/portals-focus.sub.html new file mode 100644 index 0000000000..54b4312be0 --- /dev/null +++ b/testing/web-platform/tests/portals/portals-focus.sub.html @@ -0,0 +1,184 @@ + + + + + + + + + + diff --git a/testing/web-platform/tests/portals/portals-host-exposure.sub.html b/testing/web-platform/tests/portals/portals-host-exposure.sub.html new file mode 100644 index 0000000000..fd3ac18f69 --- /dev/null +++ b/testing/web-platform/tests/portals/portals-host-exposure.sub.html @@ -0,0 +1,40 @@ + + + + + + + + diff --git a/testing/web-platform/tests/portals/portals-host-hidden-after-activation.html b/testing/web-platform/tests/portals/portals-host-hidden-after-activation.html new file mode 100644 index 0000000000..9638a6c7c6 --- /dev/null +++ b/testing/web-platform/tests/portals/portals-host-hidden-after-activation.html @@ -0,0 +1,30 @@ + + + + + + diff --git a/testing/web-platform/tests/portals/portals-host-null.html b/testing/web-platform/tests/portals/portals-host-null.html new file mode 100644 index 0000000000..e0f1d63743 --- /dev/null +++ b/testing/web-platform/tests/portals/portals-host-null.html @@ -0,0 +1,10 @@ + + + + + + diff --git a/testing/web-platform/tests/portals/portals-host-post-message.sub.html b/testing/web-platform/tests/portals/portals-host-post-message.sub.html new file mode 100644 index 0000000000..d589235ec3 --- /dev/null +++ b/testing/web-platform/tests/portals/portals-host-post-message.sub.html @@ -0,0 +1,138 @@ + +Test postMessage on PortalHost + + + + + + diff --git a/testing/web-platform/tests/portals/portals-navigate-after-adoption.html b/testing/web-platform/tests/portals/portals-navigate-after-adoption.html new file mode 100644 index 0000000000..1ca1cfb79f --- /dev/null +++ b/testing/web-platform/tests/portals/portals-navigate-after-adoption.html @@ -0,0 +1,41 @@ + + + + + diff --git a/testing/web-platform/tests/portals/portals-nested.html b/testing/web-platform/tests/portals/portals-nested.html new file mode 100644 index 0000000000..b4b396ff8d --- /dev/null +++ b/testing/web-platform/tests/portals/portals-nested.html @@ -0,0 +1,17 @@ + + + + + + diff --git a/testing/web-platform/tests/portals/portals-no-frame-crash.html b/testing/web-platform/tests/portals/portals-no-frame-crash.html new file mode 100644 index 0000000000..cc94a772c3 --- /dev/null +++ b/testing/web-platform/tests/portals/portals-no-frame-crash.html @@ -0,0 +1,30 @@ + + + + + + diff --git a/testing/web-platform/tests/portals/portals-post-message.sub.html b/testing/web-platform/tests/portals/portals-post-message.sub.html new file mode 100644 index 0000000000..d556dd43d8 --- /dev/null +++ b/testing/web-platform/tests/portals/portals-post-message.sub.html @@ -0,0 +1,189 @@ + +Test postMessage on HTMLPortalElement + + + + + + + + + + + diff --git a/testing/web-platform/tests/portals/portals-referrer-inherit-header.html b/testing/web-platform/tests/portals/portals-referrer-inherit-header.html new file mode 100644 index 0000000000..1fbd88893e --- /dev/null +++ b/testing/web-platform/tests/portals/portals-referrer-inherit-header.html @@ -0,0 +1,23 @@ + + + + + + diff --git a/testing/web-platform/tests/portals/portals-referrer-inherit-header.html.headers b/testing/web-platform/tests/portals/portals-referrer-inherit-header.html.headers new file mode 100644 index 0000000000..7ffbf17d6b --- /dev/null +++ b/testing/web-platform/tests/portals/portals-referrer-inherit-header.html.headers @@ -0,0 +1 @@ +Referrer-Policy: no-referrer diff --git a/testing/web-platform/tests/portals/portals-referrer-inherit-meta.html b/testing/web-platform/tests/portals/portals-referrer-inherit-meta.html new file mode 100644 index 0000000000..e77894cfa4 --- /dev/null +++ b/testing/web-platform/tests/portals/portals-referrer-inherit-meta.html @@ -0,0 +1,24 @@ + + + + + + + diff --git a/testing/web-platform/tests/portals/portals-referrer.html b/testing/web-platform/tests/portals/portals-referrer.html new file mode 100644 index 0000000000..4cd3b90895 --- /dev/null +++ b/testing/web-platform/tests/portals/portals-referrer.html @@ -0,0 +1,61 @@ + + + + + + diff --git a/testing/web-platform/tests/portals/portals-rendering.html b/testing/web-platform/tests/portals/portals-rendering.html new file mode 100644 index 0000000000..229dacf4e6 --- /dev/null +++ b/testing/web-platform/tests/portals/portals-rendering.html @@ -0,0 +1,22 @@ + + +Portals rendering test + + + + diff --git a/testing/web-platform/tests/portals/portals-repeated-activate.html b/testing/web-platform/tests/portals/portals-repeated-activate.html new file mode 100644 index 0000000000..f2f36cb768 --- /dev/null +++ b/testing/web-platform/tests/portals/portals-repeated-activate.html @@ -0,0 +1,11 @@ + + + + diff --git a/testing/web-platform/tests/portals/portals-set-src-after-activate.html b/testing/web-platform/tests/portals/portals-set-src-after-activate.html new file mode 100644 index 0000000000..e485ef4d51 --- /dev/null +++ b/testing/web-platform/tests/portals/portals-set-src-after-activate.html @@ -0,0 +1,38 @@ + + + + + diff --git a/testing/web-platform/tests/portals/predecessor-fires-unload.html b/testing/web-platform/tests/portals/predecessor-fires-unload.html new file mode 100644 index 0000000000..cb6d98c01d --- /dev/null +++ b/testing/web-platform/tests/portals/predecessor-fires-unload.html @@ -0,0 +1,40 @@ + + + + + diff --git a/testing/web-platform/tests/portals/references/portals-rendering.html b/testing/web-platform/tests/portals/references/portals-rendering.html new file mode 100644 index 0000000000..4a8414ab56 --- /dev/null +++ b/testing/web-platform/tests/portals/references/portals-rendering.html @@ -0,0 +1,5 @@ + +Portals rendering test + +
+ diff --git a/testing/web-platform/tests/portals/resources/attempt-portal-load.html b/testing/web-platform/tests/portals/resources/attempt-portal-load.html new file mode 100644 index 0000000000..183178006f --- /dev/null +++ b/testing/web-platform/tests/portals/resources/attempt-portal-load.html @@ -0,0 +1,11 @@ + + + + diff --git a/testing/web-platform/tests/portals/resources/blank-host.html b/testing/web-platform/tests/portals/resources/blank-host.html new file mode 100644 index 0000000000..d9f3a61eb8 --- /dev/null +++ b/testing/web-platform/tests/portals/resources/blank-host.html @@ -0,0 +1,8 @@ + + + + diff --git a/testing/web-platform/tests/portals/resources/eval-portal.html b/testing/web-platform/tests/portals/resources/eval-portal.html new file mode 100644 index 0000000000..a473501b01 --- /dev/null +++ b/testing/web-platform/tests/portals/resources/eval-portal.html @@ -0,0 +1,10 @@ + + diff --git a/testing/web-platform/tests/portals/resources/focus-page-with-autofocus.html b/testing/web-platform/tests/portals/resources/focus-page-with-autofocus.html new file mode 100644 index 0000000000..d498ef6335 --- /dev/null +++ b/testing/web-platform/tests/portals/resources/focus-page-with-autofocus.html @@ -0,0 +1,23 @@ + + + + + + + diff --git a/testing/web-platform/tests/portals/resources/focus-page-with-button.html b/testing/web-platform/tests/portals/resources/focus-page-with-button.html new file mode 100644 index 0000000000..81ed5465ab --- /dev/null +++ b/testing/web-platform/tests/portals/resources/focus-page-with-button.html @@ -0,0 +1,35 @@ + + + + + diff --git a/testing/web-platform/tests/portals/resources/focus-page-with-x-origin-iframe.sub.html b/testing/web-platform/tests/portals/resources/focus-page-with-x-origin-iframe.sub.html new file mode 100644 index 0000000000..df7974e75b --- /dev/null +++ b/testing/web-platform/tests/portals/resources/focus-page-with-x-origin-iframe.sub.html @@ -0,0 +1,28 @@ + + + + + diff --git a/testing/web-platform/tests/portals/resources/invalid.asis b/testing/web-platform/tests/portals/resources/invalid.asis new file mode 100644 index 0000000000..20f7c7f7e5 --- /dev/null +++ b/testing/web-platform/tests/portals/resources/invalid.asis @@ -0,0 +1 @@ +This is an invalid HTTP response used to produce a network error. diff --git a/testing/web-platform/tests/portals/resources/open-blank-host.js b/testing/web-platform/tests/portals/resources/open-blank-host.js new file mode 100644 index 0000000000..f7580bd152 --- /dev/null +++ b/testing/web-platform/tests/portals/resources/open-blank-host.js @@ -0,0 +1,14 @@ +// Portal tests often need to create portals in a context other than the one +// in which the tests are running. This is because the host context may be +// discarded during the course of the test. + +// Opens a blank page for use as a portal host. +// Tests cannot simply use window.open() without a URL as about:blank may not +// host a portal. +async function openBlankPortalHost() { + let hostWindow = window.open('/portals/resources/blank-host.html'); + await new Promise((resolve) => { + hostWindow.addEventListener('load', resolve, {once: true}); + }); + return hostWindow; +} diff --git a/testing/web-platform/tests/portals/resources/portal-activate-broadcastchannel.html b/testing/web-platform/tests/portals/resources/portal-activate-broadcastchannel.html new file mode 100644 index 0000000000..b922afaec2 --- /dev/null +++ b/testing/web-platform/tests/portals/resources/portal-activate-broadcastchannel.html @@ -0,0 +1,8 @@ + + diff --git a/testing/web-platform/tests/portals/resources/portal-activate-data-portal.html b/testing/web-platform/tests/portals/resources/portal-activate-data-portal.html new file mode 100644 index 0000000000..0842ad82ef --- /dev/null +++ b/testing/web-platform/tests/portals/resources/portal-activate-data-portal.html @@ -0,0 +1,9 @@ + + diff --git a/testing/web-platform/tests/portals/resources/portal-activate-event-portal.html b/testing/web-platform/tests/portals/resources/portal-activate-event-portal.html new file mode 100644 index 0000000000..6de5aafca7 --- /dev/null +++ b/testing/web-platform/tests/portals/resources/portal-activate-event-portal.html @@ -0,0 +1,21 @@ + +Tests that the PortalActivateEvent is dispatched when a portal is activated + diff --git a/testing/web-platform/tests/portals/resources/portal-activate-in-handler.html b/testing/web-platform/tests/portals/resources/portal-activate-in-handler.html new file mode 100644 index 0000000000..746ffa2b39 --- /dev/null +++ b/testing/web-platform/tests/portals/resources/portal-activate-in-handler.html @@ -0,0 +1,51 @@ + + + + + + + + + + + + diff --git a/testing/web-platform/tests/portals/resources/portal-activate-inside-portal.html b/testing/web-platform/tests/portals/resources/portal-activate-inside-portal.html new file mode 100644 index 0000000000..ff8bead324 --- /dev/null +++ b/testing/web-platform/tests/portals/resources/portal-activate-inside-portal.html @@ -0,0 +1,11 @@ + + + + diff --git a/testing/web-platform/tests/portals/resources/portal-activate-twice-window-1.html b/testing/web-platform/tests/portals/resources/portal-activate-twice-window-1.html new file mode 100644 index 0000000000..fbc5a6e93d --- /dev/null +++ b/testing/web-platform/tests/portals/resources/portal-activate-twice-window-1.html @@ -0,0 +1,12 @@ + + + + diff --git a/testing/web-platform/tests/portals/resources/portal-activate-twice-window-2.html b/testing/web-platform/tests/portals/resources/portal-activate-twice-window-2.html new file mode 100644 index 0000000000..6ba8dc5839 --- /dev/null +++ b/testing/web-platform/tests/portals/resources/portal-activate-twice-window-2.html @@ -0,0 +1,22 @@ + + + + diff --git a/testing/web-platform/tests/portals/resources/portal-close-window.html b/testing/web-platform/tests/portals/resources/portal-close-window.html new file mode 100644 index 0000000000..a12af3cd7a --- /dev/null +++ b/testing/web-platform/tests/portals/resources/portal-close-window.html @@ -0,0 +1,7 @@ + + diff --git a/testing/web-platform/tests/portals/resources/portal-embed-and-activate.html b/testing/web-platform/tests/portals/resources/portal-embed-and-activate.html new file mode 100644 index 0000000000..04f15b7fda --- /dev/null +++ b/testing/web-platform/tests/portals/resources/portal-embed-and-activate.html @@ -0,0 +1,15 @@ + + + + + + diff --git a/testing/web-platform/tests/portals/resources/portal-host-cross-origin-navigate.sub.html b/testing/web-platform/tests/portals/resources/portal-host-cross-origin-navigate.sub.html new file mode 100644 index 0000000000..26f655a0db --- /dev/null +++ b/testing/web-platform/tests/portals/resources/portal-host-cross-origin-navigate.sub.html @@ -0,0 +1,7 @@ + + + + diff --git a/testing/web-platform/tests/portals/resources/portal-host-hidden-after-activation-portal.html b/testing/web-platform/tests/portals/resources/portal-host-hidden-after-activation-portal.html new file mode 100644 index 0000000000..491d184f97 --- /dev/null +++ b/testing/web-platform/tests/portals/resources/portal-host-hidden-after-activation-portal.html @@ -0,0 +1,14 @@ + + diff --git a/testing/web-platform/tests/portals/resources/portal-host-post-message-after-activate.html b/testing/web-platform/tests/portals/resources/portal-host-post-message-after-activate.html new file mode 100644 index 0000000000..7b03ac0294 --- /dev/null +++ b/testing/web-platform/tests/portals/resources/portal-host-post-message-after-activate.html @@ -0,0 +1,19 @@ + + diff --git a/testing/web-platform/tests/portals/resources/portal-host-post-message-navigate-1.html b/testing/web-platform/tests/portals/resources/portal-host-post-message-navigate-1.html new file mode 100644 index 0000000000..a59144e7e1 --- /dev/null +++ b/testing/web-platform/tests/portals/resources/portal-host-post-message-navigate-1.html @@ -0,0 +1,5 @@ + + diff --git a/testing/web-platform/tests/portals/resources/portal-host-post-message-navigate-2.html b/testing/web-platform/tests/portals/resources/portal-host-post-message-navigate-2.html new file mode 100644 index 0000000000..571c4f122e --- /dev/null +++ b/testing/web-platform/tests/portals/resources/portal-host-post-message-navigate-2.html @@ -0,0 +1,4 @@ + + diff --git a/testing/web-platform/tests/portals/resources/portal-host-post-message-x-origin.html b/testing/web-platform/tests/portals/resources/portal-host-post-message-x-origin.html new file mode 100644 index 0000000000..6cbc7f4b88 --- /dev/null +++ b/testing/web-platform/tests/portals/resources/portal-host-post-message-x-origin.html @@ -0,0 +1,4 @@ + + diff --git a/testing/web-platform/tests/portals/resources/portal-host-post-message.html b/testing/web-platform/tests/portals/resources/portal-host-post-message.html new file mode 100644 index 0000000000..1935ee898e --- /dev/null +++ b/testing/web-platform/tests/portals/resources/portal-host-post-message.html @@ -0,0 +1,51 @@ + + diff --git a/testing/web-platform/tests/portals/resources/portal-host.html b/testing/web-platform/tests/portals/resources/portal-host.html new file mode 100644 index 0000000000..e577208236 --- /dev/null +++ b/testing/web-platform/tests/portals/resources/portal-host.html @@ -0,0 +1,11 @@ + + + + + diff --git a/testing/web-platform/tests/portals/resources/portal-inside-iframe.html b/testing/web-platform/tests/portals/resources/portal-inside-iframe.html new file mode 100644 index 0000000000..5db75d5b5f --- /dev/null +++ b/testing/web-platform/tests/portals/resources/portal-inside-iframe.html @@ -0,0 +1,4 @@ + + + + diff --git a/testing/web-platform/tests/portals/resources/portal-post-message-after-activate-window.html b/testing/web-platform/tests/portals/resources/portal-post-message-after-activate-window.html new file mode 100644 index 0000000000..73d2c11558 --- /dev/null +++ b/testing/web-platform/tests/portals/resources/portal-post-message-after-activate-window.html @@ -0,0 +1,23 @@ + + + + diff --git a/testing/web-platform/tests/portals/resources/portal-post-message-before-activate-portal.html b/testing/web-platform/tests/portals/resources/portal-post-message-before-activate-portal.html new file mode 100644 index 0000000000..d34875f981 --- /dev/null +++ b/testing/web-platform/tests/portals/resources/portal-post-message-before-activate-portal.html @@ -0,0 +1,24 @@ + + diff --git a/testing/web-platform/tests/portals/resources/portal-post-message-before-activate-window.html b/testing/web-platform/tests/portals/resources/portal-post-message-before-activate-window.html new file mode 100644 index 0000000000..6389829c7c --- /dev/null +++ b/testing/web-platform/tests/portals/resources/portal-post-message-before-activate-window.html @@ -0,0 +1,13 @@ + + + + diff --git a/testing/web-platform/tests/portals/resources/portal-post-message-during-activate-window.html b/testing/web-platform/tests/portals/resources/portal-post-message-during-activate-window.html new file mode 100644 index 0000000000..6e220277d9 --- /dev/null +++ b/testing/web-platform/tests/portals/resources/portal-post-message-during-activate-window.html @@ -0,0 +1,21 @@ + + + + diff --git a/testing/web-platform/tests/portals/resources/portal-post-message-portal.html b/testing/web-platform/tests/portals/resources/portal-post-message-portal.html new file mode 100644 index 0000000000..e83ae56e08 --- /dev/null +++ b/testing/web-platform/tests/portals/resources/portal-post-message-portal.html @@ -0,0 +1,29 @@ + + diff --git a/testing/web-platform/tests/portals/resources/portal-post-message-x-origin-portal.html b/testing/web-platform/tests/portals/resources/portal-post-message-x-origin-portal.html new file mode 100644 index 0000000000..57631f385c --- /dev/null +++ b/testing/web-platform/tests/portals/resources/portal-post-message-x-origin-portal.html @@ -0,0 +1,11 @@ + + + diff --git a/testing/web-platform/tests/portals/resources/portal-repeated-activate-window.html b/testing/web-platform/tests/portals/resources/portal-repeated-activate-window.html new file mode 100644 index 0000000000..e716034eff --- /dev/null +++ b/testing/web-platform/tests/portals/resources/portal-repeated-activate-window.html @@ -0,0 +1,20 @@ + + + + + diff --git a/testing/web-platform/tests/portals/resources/portals-adopt-predecessor-portal.html b/testing/web-platform/tests/portals/resources/portals-adopt-predecessor-portal.html new file mode 100644 index 0000000000..b838b38be1 --- /dev/null +++ b/testing/web-platform/tests/portals/resources/portals-adopt-predecessor-portal.html @@ -0,0 +1,77 @@ + + diff --git a/testing/web-platform/tests/portals/resources/portals-adopt-predecessor.html b/testing/web-platform/tests/portals/resources/portals-adopt-predecessor.html new file mode 100644 index 0000000000..66d47d12ac --- /dev/null +++ b/testing/web-platform/tests/portals/resources/portals-adopt-predecessor.html @@ -0,0 +1,20 @@ + + + + diff --git a/testing/web-platform/tests/portals/resources/portals-nested-portal.html b/testing/web-platform/tests/portals/resources/portals-nested-portal.html new file mode 100644 index 0000000000..278b32eea0 --- /dev/null +++ b/testing/web-platform/tests/portals/resources/portals-nested-portal.html @@ -0,0 +1,9 @@ + + + + diff --git a/testing/web-platform/tests/portals/resources/portals-rendering-portal.html b/testing/web-platform/tests/portals/resources/portals-rendering-portal.html new file mode 100644 index 0000000000..31b3f4a990 --- /dev/null +++ b/testing/web-platform/tests/portals/resources/portals-rendering-portal.html @@ -0,0 +1,8 @@ + + + + diff --git a/testing/web-platform/tests/portals/resources/postmessage-referrer.sub.html b/testing/web-platform/tests/portals/resources/postmessage-referrer.sub.html new file mode 100644 index 0000000000..c3837dc79d --- /dev/null +++ b/testing/web-platform/tests/portals/resources/postmessage-referrer.sub.html @@ -0,0 +1,8 @@ + + diff --git a/testing/web-platform/tests/portals/resources/predecessor-fires-unload-watch-unload.html b/testing/web-platform/tests/portals/resources/predecessor-fires-unload-watch-unload.html new file mode 100644 index 0000000000..f58da48ca1 --- /dev/null +++ b/testing/web-platform/tests/portals/resources/predecessor-fires-unload-watch-unload.html @@ -0,0 +1,25 @@ + + + + diff --git a/testing/web-platform/tests/portals/resources/simple-portal-adopts-and-activates-predecessor.html b/testing/web-platform/tests/portals/resources/simple-portal-adopts-and-activates-predecessor.html new file mode 100644 index 0000000000..56bfd10f64 --- /dev/null +++ b/testing/web-platform/tests/portals/resources/simple-portal-adopts-and-activates-predecessor.html @@ -0,0 +1,6 @@ + + + + diff --git a/testing/web-platform/tests/portals/resources/simple-portal-adopts-predecessor.html b/testing/web-platform/tests/portals/resources/simple-portal-adopts-predecessor.html new file mode 100644 index 0000000000..b5ea9f029d --- /dev/null +++ b/testing/web-platform/tests/portals/resources/simple-portal-adopts-predecessor.html @@ -0,0 +1,7 @@ + + + + diff --git a/testing/web-platform/tests/portals/resources/simple-portal.html b/testing/web-platform/tests/portals/resources/simple-portal.html new file mode 100644 index 0000000000..7d7b678cad --- /dev/null +++ b/testing/web-platform/tests/portals/resources/simple-portal.html @@ -0,0 +1,6 @@ + + + + diff --git a/testing/web-platform/tests/portals/resources/stash-utils.sub.js b/testing/web-platform/tests/portals/resources/stash-utils.sub.js new file mode 100644 index 0000000000..30efe83633 --- /dev/null +++ b/testing/web-platform/tests/portals/resources/stash-utils.sub.js @@ -0,0 +1,43 @@ +const STASH_RESPONDER = "wss://{{host}}:{{ports[wss][0]}}/stash_responder_blocking"; + +class StashUtils { + /** + * Sends a request to store (|key|, |tuple|) in Stash + * (https://web-platform-tests.org/tools/wptserve/docs/stash.html). + * @param {string} key A UUID that acts as a key that can be used to retrieve |value| later. + * @param {string} value Value to be stored in Stash. + * @returns {Promise} Promise that resolves once the server responds. + */ + static putValue(key, value) { + return new Promise(resolve => { + const ws = new WebSocket(STASH_RESPONDER); + ws.onopen = () => { + ws.send(JSON.stringify({action: 'set', key: key, value: value})); + }; + ws.onmessage = e => { + ws.close(); + resolve(); + }; + }); + } + + /** + * Retrieves value associated with |key| in Stash. If no value has been + * associated with |key| yet, the method waits for putValue to be called with + * |key|, and a value to be associated, before resolving the return promise. + * @param {string} key A UUID that uniquely identifies the value to retrieve. + * @returns {Promise} A promise that resolves with the value associated with |key|. + */ + static takeValue(key) { + return new Promise(resolve => { + const ws = new WebSocket(STASH_RESPONDER); + ws.onopen = () => { + ws.send(JSON.stringify({action: 'get', key: key})); + }; + ws.onmessage = e => { + ws.close(); + resolve(JSON.parse(e.data).value); + }; + }); + } +} diff --git a/testing/web-platform/tests/portals/xfo/portals-xfo-deny.sub.html b/testing/web-platform/tests/portals/xfo/portals-xfo-deny.sub.html new file mode 100644 index 0000000000..efc925276c --- /dev/null +++ b/testing/web-platform/tests/portals/xfo/portals-xfo-deny.sub.html @@ -0,0 +1,43 @@ + + + + + + + diff --git a/testing/web-platform/tests/portals/xfo/portals-xfo-sameorigin.html b/testing/web-platform/tests/portals/xfo/portals-xfo-sameorigin.html new file mode 100644 index 0000000000..2482476782 --- /dev/null +++ b/testing/web-platform/tests/portals/xfo/portals-xfo-sameorigin.html @@ -0,0 +1,18 @@ + + + + + + + + diff --git a/testing/web-platform/tests/portals/xfo/resources/xfo-deny.asis b/testing/web-platform/tests/portals/xfo/resources/xfo-deny.asis new file mode 100644 index 0000000000..7779830852 --- /dev/null +++ b/testing/web-platform/tests/portals/xfo/resources/xfo-deny.asis @@ -0,0 +1,8 @@ +HTTP/1.1 200 OK +Content-Type: text/html +X-Frame-Options: DENY + + + diff --git a/testing/web-platform/tests/portals/xfo/resources/xfo-sameorigin.asis b/testing/web-platform/tests/portals/xfo/resources/xfo-sameorigin.asis new file mode 100644 index 0000000000..8f3982bd84 --- /dev/null +++ b/testing/web-platform/tests/portals/xfo/resources/xfo-sameorigin.asis @@ -0,0 +1,8 @@ +HTTP/1.1 200 OK +Content-Type: text/html +X-Frame-Options: SAMEORIGIN + + + -- cgit v1.2.3