summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/navigation-api
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:43:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:43:14 +0000
commit8dd16259287f58f9273002717ec4d27e97127719 (patch)
tree3863e62a53829a84037444beab3abd4ed9dfc7d0 /testing/web-platform/tests/navigation-api
parentReleasing progress-linux version 126.0.1-1~progress7.99u1. (diff)
downloadfirefox-8dd16259287f58f9273002717ec4d27e97127719.tar.xz
firefox-8dd16259287f58f9273002717ec4d27e97127719.zip
Merging upstream version 127.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/navigation-api')
-rw-r--r--testing/web-platform/tests/navigation-api/navigate-event/event-constructor.html6
-rw-r--r--testing/web-platform/tests/navigation-api/navigate-event/navigate-anchor-cross-origin.html3
-rw-r--r--testing/web-platform/tests/navigation-api/navigate-event/navigate-anchor-download-userInitiated.html3
-rw-r--r--testing/web-platform/tests/navigation-api/navigate-event/navigate-anchor-download.html3
-rw-r--r--testing/web-platform/tests/navigation-api/navigate-event/navigate-anchor-fragment.html3
-rw-r--r--testing/web-platform/tests/navigation-api/navigate-event/navigate-anchor-same-origin-cross-document.html3
-rw-r--r--testing/web-platform/tests/navigation-api/navigate-event/navigate-anchor-userInitiated.html3
-rw-r--r--testing/web-platform/tests/navigation-api/navigate-event/navigate-anchor-with-target.html7
-rw-r--r--testing/web-platform/tests/navigation-api/navigate-event/navigate-destination-getState-back-forward.html3
-rw-r--r--testing/web-platform/tests/navigation-api/navigate-event/navigate-destination-getState-navigate.html3
-rw-r--r--testing/web-platform/tests/navigation-api/navigate-event/navigate-destination-getState-reload.html3
-rw-r--r--testing/web-platform/tests/navigation-api/navigate-event/navigate-form-get.html3
-rw-r--r--testing/web-platform/tests/navigation-api/navigate-event/navigate-form-reload.html3
-rw-r--r--testing/web-platform/tests/navigation-api/navigate-event/navigate-form-traverse.html3
-rw-r--r--testing/web-platform/tests/navigation-api/navigate-event/navigate-form-userInitiated.html3
-rw-r--r--testing/web-platform/tests/navigation-api/navigate-event/navigate-form-with-target.html3
-rw-r--r--testing/web-platform/tests/navigation-api/navigate-event/navigate-form.html3
-rw-r--r--testing/web-platform/tests/navigation-api/navigate-event/navigate-history-back-after-fragment.html3
-rw-r--r--testing/web-platform/tests/navigation-api/navigate-event/navigate-history-back-after-pushState.html3
-rw-r--r--testing/web-platform/tests/navigation-api/navigate-event/navigate-history-back-cross-document.html3
-rw-r--r--testing/web-platform/tests/navigation-api/navigate-event/navigate-history-go-0.html3
-rw-r--r--testing/web-platform/tests/navigation-api/navigate-event/navigate-history-pushState.html3
-rw-r--r--testing/web-platform/tests/navigation-api/navigate-event/navigate-history-replaceState.html3
-rw-r--r--testing/web-platform/tests/navigation-api/navigate-event/navigate-iframe-location.html3
-rw-r--r--testing/web-platform/tests/navigation-api/navigate-event/navigate-location.html3
-rw-r--r--testing/web-platform/tests/navigation-api/navigate-event/navigate-meta-refresh.html3
-rw-r--r--testing/web-platform/tests/navigation-api/navigate-event/navigate-navigation-back-cross-document.html3
-rw-r--r--testing/web-platform/tests/navigation-api/navigate-event/navigate-navigation-back-same-document-in-iframe.html3
-rw-r--r--testing/web-platform/tests/navigation-api/navigate-event/navigate-navigation-back-same-document.html3
-rw-r--r--testing/web-platform/tests/navigation-api/navigate-event/navigate-navigation-navigate.html3
-rw-r--r--testing/web-platform/tests/navigation-api/navigate-event/navigate-svg-anchor-fragment.html3
-rw-r--r--testing/web-platform/tests/navigation-api/navigate-event/navigate-to-srcdoc.html3
-rw-r--r--testing/web-platform/tests/navigation-api/navigate-event/navigate-window-open-self.html3
-rw-r--r--testing/web-platform/tests/navigation-api/navigate-event/navigate-window-open.html3
34 files changed, 72 insertions, 37 deletions
diff --git a/testing/web-platform/tests/navigation-api/navigate-event/event-constructor.html b/testing/web-platform/tests/navigation-api/navigate-event/event-constructor.html
index 863681ced7..89ac934020 100644
--- a/testing/web-platform/tests/navigation-api/navigate-event/event-constructor.html
+++ b/testing/web-platform/tests/navigation-api/navigate-event/event-constructor.html
@@ -78,7 +78,8 @@ async_test(t => {
assert_equals(event.downloadRequest, downloadRequest);
assert_equals(event.info, info);
assert_equals(event.hasUAVisualTransition, hasUAVisualTransition);
- assert_equals(event.sourceElement, sourceElement);
+ // NavigateEvent sourceElement is still in development, so test whether it is available.
+ if ("sourceElement" in e) assert_equals(event.sourceElement, sourceElement);
});
history.pushState(2, null, "#2");
}, "all properties are reflected back");
@@ -98,7 +99,8 @@ async_test(t => {
assert_equals(event.formData, null);
assert_equals(event.downloadRequest, null);
assert_equals(event.info, undefined);
- assert_equals(event.sourceElement, null);
+ // NavigateEvent sourceElement is still in development, so test whether it is available.
+ if ("sourceElement" in e) assert_equals(event.sourceElement, null);
});
history.pushState(3, null, "#3");
}, "defaults are as expected");
diff --git a/testing/web-platform/tests/navigation-api/navigate-event/navigate-anchor-cross-origin.html b/testing/web-platform/tests/navigation-api/navigate-event/navigate-anchor-cross-origin.html
index 62e5adb20a..a69b78196f 100644
--- a/testing/web-platform/tests/navigation-api/navigate-event/navigate-anchor-cross-origin.html
+++ b/testing/web-platform/tests/navigation-api/navigate-event/navigate-anchor-cross-origin.html
@@ -17,7 +17,8 @@ async_test(t => {
assert_equals(e.destination.key, "");
assert_equals(e.destination.id, "");
assert_equals(e.destination.index, -1);
- assert_equals(e.sourceElement, document.getElementById("a"));
+ // NavigateEvent sourceElement is still in development, so test whether it is available.
+ if ("sourceElement" in e) assert_equals(e.sourceElement, document.getElementById("a"));
e.preventDefault();
});
a.click();
diff --git a/testing/web-platform/tests/navigation-api/navigate-event/navigate-anchor-download-userInitiated.html b/testing/web-platform/tests/navigation-api/navigate-event/navigate-anchor-download-userInitiated.html
index 6918142529..17109a2ae8 100644
--- a/testing/web-platform/tests/navigation-api/navigate-event/navigate-anchor-download-userInitiated.html
+++ b/testing/web-platform/tests/navigation-api/navigate-event/navigate-anchor-download-userInitiated.html
@@ -21,7 +21,8 @@ async_test(t => {
assert_equals(e.destination.key, "");
assert_equals(e.destination.id, "");
assert_equals(e.destination.index, -1);
- assert_equals(e.sourceElement, document.getElementById("a"));
+ // NavigateEvent sourceElement is still in development, so test whether it is available.
+ if ("sourceElement" in e) assert_equals(e.sourceElement, document.getElementById("a"));
e.preventDefault();
t.step_timeout(t.step_func_done(() => assert_equals(location.hash, "")), 0);
});
diff --git a/testing/web-platform/tests/navigation-api/navigate-event/navigate-anchor-download.html b/testing/web-platform/tests/navigation-api/navigate-event/navigate-anchor-download.html
index d04245ec25..fbeeb69b95 100644
--- a/testing/web-platform/tests/navigation-api/navigate-event/navigate-anchor-download.html
+++ b/testing/web-platform/tests/navigation-api/navigate-event/navigate-anchor-download.html
@@ -25,7 +25,8 @@ for (const [tag, download_attr] of tests) {
assert_equals(e.destination.key, "");
assert_equals(e.destination.id, "");
assert_equals(e.destination.index, -1);
- assert_equals(e.sourceElement, a);
+ // NavigateEvent sourceElement is still in development, so test whether it is available.
+ if ("sourceElement" in e) assert_equals(e.sourceElement, a);
e.preventDefault();
});
a.click();
diff --git a/testing/web-platform/tests/navigation-api/navigate-event/navigate-anchor-fragment.html b/testing/web-platform/tests/navigation-api/navigate-event/navigate-anchor-fragment.html
index 6443ccecd1..69400c3d2f 100644
--- a/testing/web-platform/tests/navigation-api/navigate-event/navigate-anchor-fragment.html
+++ b/testing/web-platform/tests/navigation-api/navigate-event/navigate-anchor-fragment.html
@@ -17,7 +17,8 @@ async_test(t => {
assert_equals(e.destination.key, "");
assert_equals(e.destination.id, "");
assert_equals(e.destination.index, -1);
- assert_equals(e.sourceElement, document.getElementById("a"));
+ // NavigateEvent sourceElement is still in development, so test whether it is available.
+ if ("sourceElement" in e) assert_equals(e.sourceElement, document.getElementById("a"));
e.preventDefault();
t.step_timeout(t.step_func_done(() => assert_equals(location.hash, "")), 0);
});
diff --git a/testing/web-platform/tests/navigation-api/navigate-event/navigate-anchor-same-origin-cross-document.html b/testing/web-platform/tests/navigation-api/navigate-event/navigate-anchor-same-origin-cross-document.html
index 5a6dce7ec8..084993540a 100644
--- a/testing/web-platform/tests/navigation-api/navigate-event/navigate-anchor-same-origin-cross-document.html
+++ b/testing/web-platform/tests/navigation-api/navigate-event/navigate-anchor-same-origin-cross-document.html
@@ -18,7 +18,8 @@ async_test(t => {
assert_equals(e.destination.key, "");
assert_equals(e.destination.id, "");
assert_equals(e.destination.index, -1);
- assert_equals(e.sourceElement, document.getElementById("a"));
+ // NavigateEvent sourceElement is still in development, so test whether it is available.
+ if ("sourceElement" in e) assert_equals(e.sourceElement, document.getElementById("a"));
e.preventDefault();
});
a.click();
diff --git a/testing/web-platform/tests/navigation-api/navigate-event/navigate-anchor-userInitiated.html b/testing/web-platform/tests/navigation-api/navigate-event/navigate-anchor-userInitiated.html
index bb76e7a3fb..686d7ad6ee 100644
--- a/testing/web-platform/tests/navigation-api/navigate-event/navigate-anchor-userInitiated.html
+++ b/testing/web-platform/tests/navigation-api/navigate-event/navigate-anchor-userInitiated.html
@@ -20,7 +20,8 @@ async_test(t => {
assert_equals(e.destination.key, "");
assert_equals(e.destination.id, "");
assert_equals(e.destination.index, -1);
- assert_equals(e.sourceElement, document.getElementById("a"));
+ // NavigateEvent sourceElement is still in development, so test whether it is available.
+ if ("sourceElement" in e) assert_equals(e.sourceElement, document.getElementById("a"));
e.preventDefault();
t.step_timeout(t.step_func_done(() => assert_equals(location.hash, "")), 0);
});
diff --git a/testing/web-platform/tests/navigation-api/navigate-event/navigate-anchor-with-target.html b/testing/web-platform/tests/navigation-api/navigate-event/navigate-anchor-with-target.html
index e4b897d82f..de74239b3b 100644
--- a/testing/web-platform/tests/navigation-api/navigate-event/navigate-anchor-with-target.html
+++ b/testing/web-platform/tests/navigation-api/navigate-event/navigate-anchor-with-target.html
@@ -20,10 +20,11 @@ async_test(t => {
assert_equals(new URL(e.destination.url).pathname,
"/navigation-api/navigate-event/foo.html");
assert_false(e.destination.sameDocument);
- assert_equals(e.destination.key, "");
- assert_equals(e.destination.id, "");
+ assert_equals(e.destination.key, "");
+ assert_equals(e.destination.id, "");
assert_equals(e.destination.index, -1);
- assert_equals(e.sourceElement, null);
+ // NavigateEvent sourceElement is still in development, so test whether it is available.
+ if ("sourceElement" in e) assert_equals(e.sourceElement, null);
e.preventDefault();
});
a.click();
diff --git a/testing/web-platform/tests/navigation-api/navigate-event/navigate-destination-getState-back-forward.html b/testing/web-platform/tests/navigation-api/navigate-event/navigate-destination-getState-back-forward.html
index 869fc16481..b206981821 100644
--- a/testing/web-platform/tests/navigation-api/navigate-event/navigate-destination-getState-back-forward.html
+++ b/testing/web-platform/tests/navigation-api/navigate-event/navigate-destination-getState-back-forward.html
@@ -19,7 +19,8 @@ async_test(t => {
assert_equals(e.destination.key, "");
assert_equals(e.destination.id, "");
assert_equals(e.destination.index, -1);
- assert_equals(e.sourceElement, null);
+ // NavigateEvent sourceElement is still in development, so test whether it is available.
+ if ("sourceElement" in e) assert_equals(e.sourceElement, null);
});
navigation.back();
}), 0);
diff --git a/testing/web-platform/tests/navigation-api/navigate-event/navigate-destination-getState-navigate.html b/testing/web-platform/tests/navigation-api/navigate-event/navigate-destination-getState-navigate.html
index d19a168514..1e622f9911 100644
--- a/testing/web-platform/tests/navigation-api/navigate-event/navigate-destination-getState-navigate.html
+++ b/testing/web-platform/tests/navigation-api/navigate-event/navigate-destination-getState-navigate.html
@@ -16,7 +16,8 @@ async_test(t => {
assert_equals(e.destination.key, "");
assert_equals(e.destination.id, "");
assert_equals(e.destination.index, -1);
- assert_equals(e.sourceElement, null);
+ // NavigateEvent sourceElement is still in development, so test whether it is available.
+ if ("sourceElement" in e) assert_equals(e.sourceElement, null);
});
navigation.navigate("#foo", { state: navState });
}, 0);
diff --git a/testing/web-platform/tests/navigation-api/navigate-event/navigate-destination-getState-reload.html b/testing/web-platform/tests/navigation-api/navigate-event/navigate-destination-getState-reload.html
index ac6528ce7e..be33b8120d 100644
--- a/testing/web-platform/tests/navigation-api/navigate-event/navigate-destination-getState-reload.html
+++ b/testing/web-platform/tests/navigation-api/navigate-event/navigate-destination-getState-reload.html
@@ -16,7 +16,8 @@ async_test(t => {
assert_equals(e.destination.key, "");
assert_equals(e.destination.id, "");
assert_equals(e.destination.index, -1);
- assert_equals(e.sourceElement, null);
+ // NavigateEvent sourceElement is still in development, so test whether it is available.
+ if ("sourceElement" in e) assert_equals(e.sourceElement, null);
e.intercept();
});
navigation.updateCurrentEntry({ state: navState });
diff --git a/testing/web-platform/tests/navigation-api/navigate-event/navigate-form-get.html b/testing/web-platform/tests/navigation-api/navigate-event/navigate-form-get.html
index 7a71a1c305..59661a1caf 100644
--- a/testing/web-platform/tests/navigation-api/navigate-event/navigate-form-get.html
+++ b/testing/web-platform/tests/navigation-api/navigate-event/navigate-form-get.html
@@ -21,7 +21,8 @@ async_test(t => {
// Because it's a GET, not a POST
assert_equals(e.formData, null);
- assert_equals(e.sourceElement, form);
+ // NavigateEvent sourceElement is still in development, so test whether it is available.
+ if ("sourceElement" in e) assert_equals(e.sourceElement, form);
});
window.onload = t.step_func(() => form.submit());
}, "<form> submission with GET method fires navigate event but with formData null");
diff --git a/testing/web-platform/tests/navigation-api/navigate-event/navigate-form-reload.html b/testing/web-platform/tests/navigation-api/navigate-event/navigate-form-reload.html
index 2171690537..cdd3ade4ff 100644
--- a/testing/web-platform/tests/navigation-api/navigate-event/navigate-form-reload.html
+++ b/testing/web-platform/tests/navigation-api/navigate-event/navigate-form-reload.html
@@ -12,7 +12,8 @@ async_test(t => {
iframe.contentWindow.navigation.onnavigate = t.step_func(e => {
assert_equals(e.navigationType, "push");
assert_not_equals(e.formData, null);
- assert_equals(e.sourceElement, null);
+ // NavigateEvent sourceElement is still in development, so test whether it is available.
+ if ("sourceElement" in e) assert_equals(e.sourceElement, null);
iframe.onload = t.step_func(() => {
iframe.contentWindow.navigation.onnavigate = t.step_func_done(e => {
diff --git a/testing/web-platform/tests/navigation-api/navigate-event/navigate-form-traverse.html b/testing/web-platform/tests/navigation-api/navigate-event/navigate-form-traverse.html
index b9665c8056..72b8dc36ac 100644
--- a/testing/web-platform/tests/navigation-api/navigate-event/navigate-form-traverse.html
+++ b/testing/web-platform/tests/navigation-api/navigate-event/navigate-form-traverse.html
@@ -12,7 +12,8 @@ async_test(t => {
iframe.contentWindow.navigation.onnavigate = t.step_func(e => {
assert_equals(e.navigationType, "push");
assert_not_equals(e.formData, null);
- assert_equals(e.sourceElement, null);
+ // NavigateEvent sourceElement is still in development, so test whether it is available.
+ if ("sourceElement" in e) assert_equals(e.sourceElement, null);
iframe.onload = t.step_func(() => {
// Avoid the replace behavior that occurs if you navigate during the load handler
diff --git a/testing/web-platform/tests/navigation-api/navigate-event/navigate-form-userInitiated.html b/testing/web-platform/tests/navigation-api/navigate-event/navigate-form-userInitiated.html
index 246e028a0d..079f546771 100644
--- a/testing/web-platform/tests/navigation-api/navigate-event/navigate-form-userInitiated.html
+++ b/testing/web-platform/tests/navigation-api/navigate-event/navigate-form-userInitiated.html
@@ -24,7 +24,8 @@ async_test(t => {
assert_equals(e.destination.id, "");
assert_equals(e.destination.index, -1);
assert_not_equals(e.formData, null);
- assert_equals(e.sourceElement, submit);
+ // NavigateEvent sourceElement is still in development, so test whether it is available.
+ if ("sourceElement" in e) assert_equals(e.sourceElement, submit);
});
window.onload = t.step_func(() => test_driver.click(submit));
}, "<form> submission fires navigate event");
diff --git a/testing/web-platform/tests/navigation-api/navigate-event/navigate-form-with-target.html b/testing/web-platform/tests/navigation-api/navigate-event/navigate-form-with-target.html
index 4b1a8ce9d3..07418366a7 100644
--- a/testing/web-platform/tests/navigation-api/navigate-event/navigate-form-with-target.html
+++ b/testing/web-platform/tests/navigation-api/navigate-event/navigate-form-with-target.html
@@ -22,7 +22,8 @@ async_test(t => {
assert_equals(e.destination.id, "");
assert_equals(e.destination.index, -1);
assert_not_equals(e.formData, null);
- assert_equals(e.sourceElement, null);
+ // NavigateEvent sourceElement is still in development, so test whether it is available.
+ if ("sourceElement" in e) assert_equals(e.sourceElement, null);
});
form.submit();
});
diff --git a/testing/web-platform/tests/navigation-api/navigate-event/navigate-form.html b/testing/web-platform/tests/navigation-api/navigate-event/navigate-form.html
index 653ef3b8eb..8cea889bec 100644
--- a/testing/web-platform/tests/navigation-api/navigate-event/navigate-form.html
+++ b/testing/web-platform/tests/navigation-api/navigate-event/navigate-form.html
@@ -19,7 +19,8 @@ async_test(t => {
assert_equals(e.destination.id, "");
assert_equals(e.destination.index, -1);
assert_not_equals(e.formData, null);
- assert_equals(e.sourceElement, form);
+ // NavigateEvent sourceElement is still in development, so test whether it is available.
+ if ("sourceElement" in e) assert_equals(e.sourceElement, form);
});
window.onload = t.step_func(() => form.submit());
}, "<form> submission fires navigate event");
diff --git a/testing/web-platform/tests/navigation-api/navigate-event/navigate-history-back-after-fragment.html b/testing/web-platform/tests/navigation-api/navigate-event/navigate-history-back-after-fragment.html
index 9da4ddcd50..4529fe25ac 100644
--- a/testing/web-platform/tests/navigation-api/navigate-event/navigate-history-back-after-fragment.html
+++ b/testing/web-platform/tests/navigation-api/navigate-event/navigate-history-back-after-fragment.html
@@ -24,7 +24,8 @@ async_test(t => {
assert_equals(e.destination.id, target_id);
assert_equals(e.destination.index, start_index);
assert_equals(e.formData, null);
- assert_equals(e.sourceElement, null);
+ // NavigateEvent sourceElement is still in development, so test whether it is available.
+ if ("sourceElement" in e) assert_equals(e.sourceElement, null);
});
history.back();
diff --git a/testing/web-platform/tests/navigation-api/navigate-event/navigate-history-back-after-pushState.html b/testing/web-platform/tests/navigation-api/navigate-event/navigate-history-back-after-pushState.html
index fdee41a312..06c3b89bbc 100644
--- a/testing/web-platform/tests/navigation-api/navigate-event/navigate-history-back-after-pushState.html
+++ b/testing/web-platform/tests/navigation-api/navigate-event/navigate-history-back-after-pushState.html
@@ -24,7 +24,8 @@ async_test(t => {
assert_equals(e.destination.id, target_id);
assert_equals(e.destination.index, start_index);
assert_equals(e.formData, null);
- assert_equals(e.sourceElement, null);
+ // NavigateEvent sourceElement is still in development, so test whether it is available.
+ if ("sourceElement" in e) assert_equals(e.sourceElement, null);
});
history.back();
diff --git a/testing/web-platform/tests/navigation-api/navigate-event/navigate-history-back-cross-document.html b/testing/web-platform/tests/navigation-api/navigate-event/navigate-history-back-cross-document.html
index 29c626a522..a34b20a5e5 100644
--- a/testing/web-platform/tests/navigation-api/navigate-event/navigate-history-back-cross-document.html
+++ b/testing/web-platform/tests/navigation-api/navigate-event/navigate-history-back-cross-document.html
@@ -23,7 +23,8 @@ async_test(t => {
assert_equals(e.destination.index, 0);
assert_equals(e.formData, null);
assert_equals(e.info, undefined);
- assert_equals(e.sourceElement, null);
+ // NavigateEvent sourceElement is still in development, so test whether it is available.
+ if ("sourceElement" in e) assert_equals(e.sourceElement, null);
});
assert_true(i.contentWindow.navigation.canGoBack);
i.contentWindow.history.back();
diff --git a/testing/web-platform/tests/navigation-api/navigate-event/navigate-history-go-0.html b/testing/web-platform/tests/navigation-api/navigate-event/navigate-history-go-0.html
index 5508928e19..cd716bfafb 100644
--- a/testing/web-platform/tests/navigation-api/navigate-event/navigate-history-go-0.html
+++ b/testing/web-platform/tests/navigation-api/navigate-event/navigate-history-go-0.html
@@ -18,7 +18,8 @@ async_test(t => {
assert_equals(e.destination.id, "");
assert_equals(e.destination.index, -1);
assert_equals(e.formData, null);
- assert_equals(e.sourceElement, null);
+ // NavigateEvent sourceElement is still in development, so test whether it is available.
+ if ("sourceElement" in e) assert_equals(e.sourceElement, null);
e.preventDefault();
});
diff --git a/testing/web-platform/tests/navigation-api/navigate-event/navigate-history-pushState.html b/testing/web-platform/tests/navigation-api/navigate-event/navigate-history-pushState.html
index 5079b21078..f89288b6ed 100644
--- a/testing/web-platform/tests/navigation-api/navigate-event/navigate-history-pushState.html
+++ b/testing/web-platform/tests/navigation-api/navigate-event/navigate-history-pushState.html
@@ -17,7 +17,8 @@ async_test(t => {
assert_equals(e.destination.id, "");
assert_equals(e.destination.index, -1);
assert_equals(e.formData, null);
- assert_equals(e.sourceElement, null);
+ // NavigateEvent sourceElement is still in development, so test whether it is available.
+ if ("sourceElement" in e) assert_equals(e.sourceElement, null);
e.preventDefault();
t.step_timeout(t.step_func_done(() => {
assert_equals(location.hash, "");
diff --git a/testing/web-platform/tests/navigation-api/navigate-event/navigate-history-replaceState.html b/testing/web-platform/tests/navigation-api/navigate-event/navigate-history-replaceState.html
index 444116a632..d18feb2bc1 100644
--- a/testing/web-platform/tests/navigation-api/navigate-event/navigate-history-replaceState.html
+++ b/testing/web-platform/tests/navigation-api/navigate-event/navigate-history-replaceState.html
@@ -17,7 +17,8 @@ async_test(t => {
assert_equals(e.destination.id, "");
assert_equals(e.destination.index, -1);
assert_equals(e.formData, null);
- assert_equals(e.sourceElement, null);
+ // NavigateEvent sourceElement is still in development, so test whether it is available.
+ if ("sourceElement" in e) assert_equals(e.sourceElement, null);
e.preventDefault();
t.step_timeout(t.step_func_done(() => {
assert_equals(location.hash, "");
diff --git a/testing/web-platform/tests/navigation-api/navigate-event/navigate-iframe-location.html b/testing/web-platform/tests/navigation-api/navigate-event/navigate-iframe-location.html
index 1bd7918823..c00a6e010d 100644
--- a/testing/web-platform/tests/navigation-api/navigate-event/navigate-iframe-location.html
+++ b/testing/web-platform/tests/navigation-api/navigate-event/navigate-iframe-location.html
@@ -21,7 +21,8 @@ async_test(t => {
assert_equals(e.destination.id, "");
assert_equals(e.destination.index, -1);
assert_equals(e.formData, null);
- assert_equals(e.sourceElement, null);
+ // NavigateEvent sourceElement is still in development, so test whether it is available.
+ if ("sourceElement" in e) assert_equals(e.sourceElement, null);
e.preventDefault();
t.step_timeout(t.step_func_done(() => assert_equals(location.hash, "")), 0);
});
diff --git a/testing/web-platform/tests/navigation-api/navigate-event/navigate-location.html b/testing/web-platform/tests/navigation-api/navigate-event/navigate-location.html
index a0ed4dc0aa..b1ce204a62 100644
--- a/testing/web-platform/tests/navigation-api/navigate-event/navigate-location.html
+++ b/testing/web-platform/tests/navigation-api/navigate-event/navigate-location.html
@@ -17,7 +17,8 @@ async_test(t => {
assert_equals(e.destination.id, "");
assert_equals(e.destination.index, -1);
assert_equals(e.formData, null);
- assert_equals(e.sourceElement, null);
+ // NavigateEvent sourceElement is still in development, so test whether it is available.
+ if ("sourceElement" in e) assert_equals(e.sourceElement, null);
});
location.href = "#1";
}, "location API fires navigate event");
diff --git a/testing/web-platform/tests/navigation-api/navigate-event/navigate-meta-refresh.html b/testing/web-platform/tests/navigation-api/navigate-event/navigate-meta-refresh.html
index d4d5b1c8e1..f64484c305 100644
--- a/testing/web-platform/tests/navigation-api/navigate-event/navigate-meta-refresh.html
+++ b/testing/web-platform/tests/navigation-api/navigate-event/navigate-meta-refresh.html
@@ -20,7 +20,8 @@ async_test(t => {
assert_equals(e.destination.id, "");
assert_equals(e.destination.index, -1);
assert_equals(e.formData, null);
- assert_equals(e.sourceElement, null);
+ // NavigateEvent sourceElement is still in development, so test whether it is available.
+ if ("sourceElement" in e) assert_equals(e.sourceElement, null);
e.preventDefault();
});
});
diff --git a/testing/web-platform/tests/navigation-api/navigate-event/navigate-navigation-back-cross-document.html b/testing/web-platform/tests/navigation-api/navigate-event/navigate-navigation-back-cross-document.html
index 084051539b..de87fbbb80 100644
--- a/testing/web-platform/tests/navigation-api/navigate-event/navigate-navigation-back-cross-document.html
+++ b/testing/web-platform/tests/navigation-api/navigate-event/navigate-navigation-back-cross-document.html
@@ -25,7 +25,8 @@ async_test(t => {
assert_equals(e.destination.index, 0);
assert_equals(e.formData, null);
assert_equals(e.info, "hi");
- assert_equals(e.sourceElement, null);
+ // NavigateEvent sourceElement is still in development, so test whether it is available.
+ if ("sourceElement" in e) assert_equals(e.sourceElement, null);
});
i.contentWindow.onbeforeunload = () => beforeunload_called = true;
assert_true(i.contentWindow.navigation.canGoBack);
diff --git a/testing/web-platform/tests/navigation-api/navigate-event/navigate-navigation-back-same-document-in-iframe.html b/testing/web-platform/tests/navigation-api/navigate-event/navigate-navigation-back-same-document-in-iframe.html
index 42c694e290..3d810d2f1d 100644
--- a/testing/web-platform/tests/navigation-api/navigate-event/navigate-navigation-back-same-document-in-iframe.html
+++ b/testing/web-platform/tests/navigation-api/navigate-event/navigate-navigation-back-same-document-in-iframe.html
@@ -27,7 +27,8 @@ promise_test(async t => {
assert_equals(e.destination.index, 0);
assert_equals(e.formData, null);
assert_equals(e.info, "hi");
- assert_equals(e.sourceElement, null);
+ // NavigateEvent sourceElement is still in development, so test whether it is available.
+ if ("sourceElement" in e) assert_equals(e.sourceElement, null);
}
await i.contentWindow.navigation.back({ info: "hi" }).finished;
}, "navigate event for navigation.back() - same-document in an iframe");
diff --git a/testing/web-platform/tests/navigation-api/navigate-event/navigate-navigation-back-same-document.html b/testing/web-platform/tests/navigation-api/navigate-event/navigate-navigation-back-same-document.html
index b08bbfcbf1..0f2faff7d7 100644
--- a/testing/web-platform/tests/navigation-api/navigate-event/navigate-navigation-back-same-document.html
+++ b/testing/web-platform/tests/navigation-api/navigate-event/navigate-navigation-back-same-document.html
@@ -25,7 +25,8 @@ async_test(t => {
assert_equals(e.formData, null);
assert_equals(e.info, "hi");
assert_not_equals(e.hasUAVisualTransition, undefined);
- assert_equals(e.sourceElement, null);
+ // NavigateEvent sourceElement is still in development, so test whether it is available.
+ if ("sourceElement" in e) assert_equals(e.sourceElement, null);
});
assert_true(navigation.canGoBack);
navigation.back({ info: "hi" });
diff --git a/testing/web-platform/tests/navigation-api/navigate-event/navigate-navigation-navigate.html b/testing/web-platform/tests/navigation-api/navigate-event/navigate-navigation-navigate.html
index c56af1b40d..5dd1892cc0 100644
--- a/testing/web-platform/tests/navigation-api/navigate-event/navigate-navigation-navigate.html
+++ b/testing/web-platform/tests/navigation-api/navigate-event/navigate-navigation-navigate.html
@@ -16,7 +16,8 @@ async_test(t => {
assert_equals(e.destination.id, "");
assert_equals(e.destination.index, -1);
assert_equals(e.formData, null);
- assert_equals(e.sourceElement, null);
+ // NavigateEvent sourceElement is still in development, so test whether it is available.
+ if ("sourceElement" in e) assert_equals(e.sourceElement, null);
});
navigation.navigate("#foo");
}, "navigate event for navigation.navigate()");
diff --git a/testing/web-platform/tests/navigation-api/navigate-event/navigate-svg-anchor-fragment.html b/testing/web-platform/tests/navigation-api/navigate-event/navigate-svg-anchor-fragment.html
index c6d210cccb..647496fd5c 100644
--- a/testing/web-platform/tests/navigation-api/navigate-event/navigate-svg-anchor-fragment.html
+++ b/testing/web-platform/tests/navigation-api/navigate-event/navigate-svg-anchor-fragment.html
@@ -17,7 +17,8 @@ async_test(t => {
assert_equals(e.destination.key, "");
assert_equals(e.destination.id, "");
assert_equals(e.destination.index, -1);
- assert_equals(e.sourceElement, document.getElementById("a"));
+ // NavigateEvent sourceElement is still in development, so test whether it is available.
+ if ("sourceElement" in e) assert_equals(e.sourceElement, document.getElementById("a"));
e.preventDefault();
t.step_timeout(t.step_func_done(() => assert_equals(location.hash, "")), 0);
});
diff --git a/testing/web-platform/tests/navigation-api/navigate-event/navigate-to-srcdoc.html b/testing/web-platform/tests/navigation-api/navigate-event/navigate-to-srcdoc.html
index ea5c3f9216..bb598d8b90 100644
--- a/testing/web-platform/tests/navigation-api/navigate-event/navigate-to-srcdoc.html
+++ b/testing/web-platform/tests/navigation-api/navigate-event/navigate-to-srcdoc.html
@@ -21,7 +21,8 @@ async_test(t => {
assert_equals(e.destination.id, "");
assert_equals(e.destination.index, -1);
assert_equals(e.formData, null);
- assert_equals(e.sourceElement, null);
+ // NavigateEvent sourceElement is still in development, so test whether it is available.
+ if ("sourceElement" in e) assert_equals(e.sourceElement, null);
e.preventDefault();
// Make sure it doesn't navigate anyway.
diff --git a/testing/web-platform/tests/navigation-api/navigate-event/navigate-window-open-self.html b/testing/web-platform/tests/navigation-api/navigate-event/navigate-window-open-self.html
index 4e569b6d54..1ef65ed82b 100644
--- a/testing/web-platform/tests/navigation-api/navigate-event/navigate-window-open-self.html
+++ b/testing/web-platform/tests/navigation-api/navigate-event/navigate-window-open-self.html
@@ -16,7 +16,8 @@ async_test(t => {
assert_equals(e.destination.id, "");
assert_equals(e.destination.index, -1);
assert_equals(e.formData, null);
- assert_equals(e.sourceElement, null);
+ // NavigateEvent sourceElement is still in development, so test whether it is available.
+ if ("sourceElement" in e) assert_equals(e.sourceElement, null);
e.preventDefault();
});
window.onload = t.step_func(() => window.open("#1", "_self"));
diff --git a/testing/web-platform/tests/navigation-api/navigate-event/navigate-window-open.html b/testing/web-platform/tests/navigation-api/navigate-event/navigate-window-open.html
index 42828308d7..13cdefb5d3 100644
--- a/testing/web-platform/tests/navigation-api/navigate-event/navigate-window-open.html
+++ b/testing/web-platform/tests/navigation-api/navigate-event/navigate-window-open.html
@@ -21,7 +21,8 @@ async_test(t => {
assert_equals(e.destination.id, "");
assert_equals(e.destination.index, -1);
assert_equals(e.formData, null);
- assert_equals(e.sourceElement, null);
+ // NavigateEvent sourceElement is still in development, so test whether it is available.
+ if ("sourceElement" in e) assert_equals(e.sourceElement, null);
e.preventDefault();
});