diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
commit | 26a029d407be480d791972afb5975cf62c9360a6 (patch) | |
tree | f435a8308119effd964b339f76abb83a57c29483 /testing/web-platform/tests/navigation-api/navigation-methods/resources | |
parent | Initial commit. (diff) | |
download | firefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz firefox-26a029d407be480d791972afb5975cf62c9360a6.zip |
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/navigation-api/navigation-methods/resources')
7 files changed, 35 insertions, 0 deletions
diff --git a/testing/web-platform/tests/navigation-api/navigation-methods/resources/fetch-event-test-worker.js b/testing/web-platform/tests/navigation-api/navigation-methods/resources/fetch-event-test-worker.js new file mode 100644 index 0000000000..98b7dd0fb5 --- /dev/null +++ b/testing/web-platform/tests/navigation-api/navigation-methods/resources/fetch-event-test-worker.js @@ -0,0 +1,7 @@ +self.addEventListener('fetch', function(event) { + const request = event.request; + const body = + `method = ${request.method}, ` + + `isReloadNavigation = ${request.isReloadNavigation}`; + event.transitionWhile(new Response(body)); +}); diff --git a/testing/web-platform/tests/navigation-api/navigation-methods/resources/navigate-parent.html b/testing/web-platform/tests/navigation-api/navigation-methods/resources/navigate-parent.html new file mode 100644 index 0000000000..8584bb5774 --- /dev/null +++ b/testing/web-platform/tests/navigation-api/navigation-methods/resources/navigate-parent.html @@ -0,0 +1,6 @@ +<!DOCTYPE html> +<script> +window.navigateParent = () => { + return parent.navigation.navigate("#2"); +}; +</script> diff --git a/testing/web-platform/tests/navigation-api/navigation-methods/resources/navigate-sibling.html b/testing/web-platform/tests/navigation-api/navigation-methods/resources/navigate-sibling.html new file mode 100644 index 0000000000..29a5ee7390 --- /dev/null +++ b/testing/web-platform/tests/navigation-api/navigation-methods/resources/navigate-sibling.html @@ -0,0 +1,6 @@ +<!DOCTYPE html> +<script> +window.navigateSibling = () => { + return parent.frames[0].navigation.navigate("/common/blank.html?2"); +}; +</script> diff --git a/testing/web-platform/tests/navigation-api/navigation-methods/resources/navigation-back.html b/testing/web-platform/tests/navigation-api/navigation-methods/resources/navigation-back.html new file mode 100644 index 0000000000..a1441801ac --- /dev/null +++ b/testing/web-platform/tests/navigation-api/navigation-methods/resources/navigation-back.html @@ -0,0 +1,6 @@ +<!DOCTYPE html> +<script> +window.doNavigationBack = () => { + return navigation.back(); +}; +</script> diff --git a/testing/web-platform/tests/navigation-api/navigation-methods/resources/page-with-base-url-common.html b/testing/web-platform/tests/navigation-api/navigation-methods/resources/page-with-base-url-common.html new file mode 100644 index 0000000000..8d9fedcc2b --- /dev/null +++ b/testing/web-platform/tests/navigation-api/navigation-methods/resources/page-with-base-url-common.html @@ -0,0 +1,2 @@ +<!DOCTYPE html> +<base href="/common/"> diff --git a/testing/web-platform/tests/navigation-api/navigation-methods/resources/service-worker-page.html b/testing/web-platform/tests/navigation-api/navigation-methods/resources/service-worker-page.html new file mode 100644 index 0000000000..a10ff35dce --- /dev/null +++ b/testing/web-platform/tests/navigation-api/navigation-methods/resources/service-worker-page.html @@ -0,0 +1,2 @@ +<!DOCTYPE html> +<p>We can't use /common/blank.html because of scope restrictions. diff --git a/testing/web-platform/tests/navigation-api/navigation-methods/resources/slow-no-store.py b/testing/web-platform/tests/navigation-api/navigation-methods/resources/slow-no-store.py new file mode 100644 index 0000000000..48e5fc0266 --- /dev/null +++ b/testing/web-platform/tests/navigation-api/navigation-methods/resources/slow-no-store.py @@ -0,0 +1,6 @@ +import time + +def main(request, response): + # Sleep for 1sec + time.sleep(1) + response.headers.set(b"Cache-Control", b"no-cache, no-store, must-revalidate"); |