summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/navigation-api/navigation-methods/resources
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/navigation-api/navigation-methods/resources')
-rw-r--r--testing/web-platform/tests/navigation-api/navigation-methods/resources/fetch-event-test-worker.js7
-rw-r--r--testing/web-platform/tests/navigation-api/navigation-methods/resources/navigate-parent.html6
-rw-r--r--testing/web-platform/tests/navigation-api/navigation-methods/resources/navigate-sibling.html6
-rw-r--r--testing/web-platform/tests/navigation-api/navigation-methods/resources/navigation-back.html6
-rw-r--r--testing/web-platform/tests/navigation-api/navigation-methods/resources/page-with-base-url-common.html2
-rw-r--r--testing/web-platform/tests/navigation-api/navigation-methods/resources/service-worker-page.html2
-rw-r--r--testing/web-platform/tests/navigation-api/navigation-methods/resources/slow-no-store.py6
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");