Skip to content

Commit 40d495e

Browse files
noamrmoz-wptsync-bot
authored andcommitted
Bug 1944223 [wpt PR 50329] - Revert "Check use of NavigateEvent.sourceElement", a=testonly
Automatic update from web-platform-tests Revert "Check use of NavigateEvent.sourceElement (#46072)" (#50329) This reverts commit 6c91fbce8312c431a1e0a6db5d001438f96531e9 (#46072) as part of whatwg/html#10898. -- wpt-commits: 765e5eec7bda0828ba73b3b0d28a7d661eeceb17 wpt-pr: 50329
1 parent d75038c commit 40d495e

34 files changed

+37
-72
lines changed

testing/web-platform/tests/navigation-api/navigate-event/event-constructor.html

+2-4
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,7 @@
7878
assert_equals(event.downloadRequest, downloadRequest);
7979
assert_equals(event.info, info);
8080
assert_equals(event.hasUAVisualTransition, hasUAVisualTransition);
81-
// NavigateEvent sourceElement is still in development, so test whether it is available.
82-
if ("sourceElement" in e) assert_equals(event.sourceElement, sourceElement);
81+
assert_equals(event.sourceElement, sourceElement);
8382
});
8483
history.pushState(2, null, "#2");
8584
}, "all properties are reflected back");
@@ -99,8 +98,7 @@
9998
assert_equals(event.formData, null);
10099
assert_equals(event.downloadRequest, null);
101100
assert_equals(event.info, undefined);
102-
// NavigateEvent sourceElement is still in development, so test whether it is available.
103-
if ("sourceElement" in e) assert_equals(event.sourceElement, null);
101+
assert_equals(event.sourceElement, null);
104102
});
105103
history.pushState(3, null, "#3");
106104
}, "defaults are as expected");

testing/web-platform/tests/navigation-api/navigate-event/navigate-anchor-cross-origin.html

+1-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@
1717
assert_equals(e.destination.key, "");
1818
assert_equals(e.destination.id, "");
1919
assert_equals(e.destination.index, -1);
20-
// NavigateEvent sourceElement is still in development, so test whether it is available.
21-
if ("sourceElement" in e) assert_equals(e.sourceElement, document.getElementById("a"));
20+
assert_equals(e.sourceElement, document.getElementById("a"));
2221
e.preventDefault();
2322
});
2423
a.click();

testing/web-platform/tests/navigation-api/navigate-event/navigate-anchor-download-userInitiated.html

+1-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@
2121
assert_equals(e.destination.key, "");
2222
assert_equals(e.destination.id, "");
2323
assert_equals(e.destination.index, -1);
24-
// NavigateEvent sourceElement is still in development, so test whether it is available.
25-
if ("sourceElement" in e) assert_equals(e.sourceElement, document.getElementById("a"));
24+
assert_equals(e.sourceElement, document.getElementById("a"));
2625
e.preventDefault();
2726
t.step_timeout(t.step_func_done(() => assert_equals(location.hash, "")), 0);
2827
});

testing/web-platform/tests/navigation-api/navigate-event/navigate-anchor-download.html

+1-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@
2525
assert_equals(e.destination.key, "");
2626
assert_equals(e.destination.id, "");
2727
assert_equals(e.destination.index, -1);
28-
// NavigateEvent sourceElement is still in development, so test whether it is available.
29-
if ("sourceElement" in e) assert_equals(e.sourceElement, a);
28+
assert_equals(e.sourceElement, a);
3029
e.preventDefault();
3130
});
3231
a.click();

testing/web-platform/tests/navigation-api/navigate-event/navigate-anchor-fragment.html

+1-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@
1717
assert_equals(e.destination.key, "");
1818
assert_equals(e.destination.id, "");
1919
assert_equals(e.destination.index, -1);
20-
// NavigateEvent sourceElement is still in development, so test whether it is available.
21-
if ("sourceElement" in e) assert_equals(e.sourceElement, document.getElementById("a"));
20+
assert_equals(e.sourceElement, document.getElementById("a"));
2221
e.preventDefault();
2322
t.step_timeout(t.step_func_done(() => assert_equals(location.hash, "")), 0);
2423
});

testing/web-platform/tests/navigation-api/navigate-event/navigate-anchor-same-origin-cross-document.html

+1-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@
1818
assert_equals(e.destination.key, "");
1919
assert_equals(e.destination.id, "");
2020
assert_equals(e.destination.index, -1);
21-
// NavigateEvent sourceElement is still in development, so test whether it is available.
22-
if ("sourceElement" in e) assert_equals(e.sourceElement, document.getElementById("a"));
21+
assert_equals(e.sourceElement, document.getElementById("a"));
2322
e.preventDefault();
2423
});
2524
a.click();

testing/web-platform/tests/navigation-api/navigate-event/navigate-anchor-userInitiated.html

+1-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@
2020
assert_equals(e.destination.key, "");
2121
assert_equals(e.destination.id, "");
2222
assert_equals(e.destination.index, -1);
23-
// NavigateEvent sourceElement is still in development, so test whether it is available.
24-
if ("sourceElement" in e) assert_equals(e.sourceElement, document.getElementById("a"));
23+
assert_equals(e.sourceElement, document.getElementById("a"));
2524
e.preventDefault();
2625
t.step_timeout(t.step_func_done(() => assert_equals(location.hash, "")), 0);
2726
});

testing/web-platform/tests/navigation-api/navigate-event/navigate-anchor-with-target.html

+3-4
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,10 @@
2020
assert_equals(new URL(e.destination.url).pathname,
2121
"/navigation-api/navigate-event/foo.html");
2222
assert_false(e.destination.sameDocument);
23-
assert_equals(e.destination.key, "");
24-
assert_equals(e.destination.id, "");
23+
assert_equals(e.destination.key, "");
24+
assert_equals(e.destination.id, "");
2525
assert_equals(e.destination.index, -1);
26-
// NavigateEvent sourceElement is still in development, so test whether it is available.
27-
if ("sourceElement" in e) assert_equals(e.sourceElement, null);
26+
assert_equals(e.sourceElement, null);
2827
e.preventDefault();
2928
});
3029
a.click();

testing/web-platform/tests/navigation-api/navigate-event/navigate-destination-getState-back-forward.html

+1-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@
1919
assert_equals(e.destination.key, "");
2020
assert_equals(e.destination.id, "");
2121
assert_equals(e.destination.index, -1);
22-
// NavigateEvent sourceElement is still in development, so test whether it is available.
23-
if ("sourceElement" in e) assert_equals(e.sourceElement, null);
22+
assert_equals(e.sourceElement, null);
2423
});
2524
navigation.back();
2625
}), 0);

testing/web-platform/tests/navigation-api/navigate-event/navigate-destination-getState-navigate.html

+1-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@
1616
assert_equals(e.destination.key, "");
1717
assert_equals(e.destination.id, "");
1818
assert_equals(e.destination.index, -1);
19-
// NavigateEvent sourceElement is still in development, so test whether it is available.
20-
if ("sourceElement" in e) assert_equals(e.sourceElement, null);
19+
assert_equals(e.sourceElement, null);
2120
});
2221
navigation.navigate("#foo", { state: navState });
2322
}, 0);

testing/web-platform/tests/navigation-api/navigate-event/navigate-destination-getState-reload.html

+1-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@
1616
assert_equals(e.destination.key, "");
1717
assert_equals(e.destination.id, "");
1818
assert_equals(e.destination.index, -1);
19-
// NavigateEvent sourceElement is still in development, so test whether it is available.
20-
if ("sourceElement" in e) assert_equals(e.sourceElement, null);
19+
assert_equals(e.sourceElement, null);
2120
e.intercept();
2221
});
2322
navigation.updateCurrentEntry({ state: navState });

testing/web-platform/tests/navigation-api/navigate-event/navigate-form-get.html

+1-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@
2121

2222
// Because it's a GET, not a POST
2323
assert_equals(e.formData, null);
24-
// NavigateEvent sourceElement is still in development, so test whether it is available.
25-
if ("sourceElement" in e) assert_equals(e.sourceElement, form);
24+
assert_equals(e.sourceElement, form);
2625
});
2726
window.onload = t.step_func(() => form.submit());
2827
}, "<form> submission with GET method fires navigate event but with formData null");

testing/web-platform/tests/navigation-api/navigate-event/navigate-form-reload.html

+1-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@
1212
iframe.contentWindow.navigation.onnavigate = t.step_func(e => {
1313
assert_equals(e.navigationType, "push");
1414
assert_not_equals(e.formData, null);
15-
// NavigateEvent sourceElement is still in development, so test whether it is available.
16-
if ("sourceElement" in e) assert_equals(e.sourceElement, null);
15+
assert_equals(e.sourceElement, null);
1716

1817
iframe.onload = t.step_func(() => {
1918
iframe.contentWindow.navigation.onnavigate = t.step_func_done(e => {

testing/web-platform/tests/navigation-api/navigate-event/navigate-form-traverse.html

+1-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@
1212
iframe.contentWindow.navigation.onnavigate = t.step_func(e => {
1313
assert_equals(e.navigationType, "push");
1414
assert_not_equals(e.formData, null);
15-
// NavigateEvent sourceElement is still in development, so test whether it is available.
16-
if ("sourceElement" in e) assert_equals(e.sourceElement, null);
15+
assert_equals(e.sourceElement, null);
1716

1817
iframe.onload = t.step_func(() => {
1918
// Avoid the replace behavior that occurs if you navigate during the load handler

testing/web-platform/tests/navigation-api/navigate-event/navigate-form-userInitiated.html

+1-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@
2424
assert_equals(e.destination.id, "");
2525
assert_equals(e.destination.index, -1);
2626
assert_not_equals(e.formData, null);
27-
// NavigateEvent sourceElement is still in development, so test whether it is available.
28-
if ("sourceElement" in e) assert_equals(e.sourceElement, submit);
27+
assert_equals(e.sourceElement, submit);
2928
});
3029
window.onload = t.step_func(() => test_driver.click(submit));
3130
}, "<form> submission fires navigate event");

testing/web-platform/tests/navigation-api/navigate-event/navigate-form-with-target.html

+1-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@
2222
assert_equals(e.destination.id, "");
2323
assert_equals(e.destination.index, -1);
2424
assert_not_equals(e.formData, null);
25-
// NavigateEvent sourceElement is still in development, so test whether it is available.
26-
if ("sourceElement" in e) assert_equals(e.sourceElement, null);
25+
assert_equals(e.sourceElement, null);
2726
});
2827
form.submit();
2928
});

testing/web-platform/tests/navigation-api/navigate-event/navigate-form.html

+1-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@
1919
assert_equals(e.destination.id, "");
2020
assert_equals(e.destination.index, -1);
2121
assert_not_equals(e.formData, null);
22-
// NavigateEvent sourceElement is still in development, so test whether it is available.
23-
if ("sourceElement" in e) assert_equals(e.sourceElement, form);
22+
assert_equals(e.sourceElement, form);
2423
});
2524
window.onload = t.step_func(() => form.submit());
2625
}, "<form> submission fires navigate event");

testing/web-platform/tests/navigation-api/navigate-event/navigate-history-back-after-fragment.html

+1-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@
2424
assert_equals(e.destination.id, target_id);
2525
assert_equals(e.destination.index, start_index);
2626
assert_equals(e.formData, null);
27-
// NavigateEvent sourceElement is still in development, so test whether it is available.
28-
if ("sourceElement" in e) assert_equals(e.sourceElement, null);
27+
assert_equals(e.sourceElement, null);
2928
});
3029

3130
history.back();

testing/web-platform/tests/navigation-api/navigate-event/navigate-history-back-after-pushState.html

+1-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@
2424
assert_equals(e.destination.id, target_id);
2525
assert_equals(e.destination.index, start_index);
2626
assert_equals(e.formData, null);
27-
// NavigateEvent sourceElement is still in development, so test whether it is available.
28-
if ("sourceElement" in e) assert_equals(e.sourceElement, null);
27+
assert_equals(e.sourceElement, null);
2928
});
3029

3130
history.back();

testing/web-platform/tests/navigation-api/navigate-event/navigate-history-back-cross-document.html

+1-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@
2323
assert_equals(e.destination.index, 0);
2424
assert_equals(e.formData, null);
2525
assert_equals(e.info, undefined);
26-
// NavigateEvent sourceElement is still in development, so test whether it is available.
27-
if ("sourceElement" in e) assert_equals(e.sourceElement, null);
26+
assert_equals(e.sourceElement, null);
2827
});
2928
assert_true(i.contentWindow.navigation.canGoBack);
3029
i.contentWindow.history.back();

testing/web-platform/tests/navigation-api/navigate-event/navigate-history-go-0.html

+1-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@
1818
assert_equals(e.destination.id, "");
1919
assert_equals(e.destination.index, -1);
2020
assert_equals(e.formData, null);
21-
// NavigateEvent sourceElement is still in development, so test whether it is available.
22-
if ("sourceElement" in e) assert_equals(e.sourceElement, null);
21+
assert_equals(e.sourceElement, null);
2322
e.preventDefault();
2423
});
2524

testing/web-platform/tests/navigation-api/navigate-event/navigate-history-pushState.html

+1-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@
1717
assert_equals(e.destination.id, "");
1818
assert_equals(e.destination.index, -1);
1919
assert_equals(e.formData, null);
20-
// NavigateEvent sourceElement is still in development, so test whether it is available.
21-
if ("sourceElement" in e) assert_equals(e.sourceElement, null);
20+
assert_equals(e.sourceElement, null);
2221
e.preventDefault();
2322
t.step_timeout(t.step_func_done(() => {
2423
assert_equals(location.hash, "");

testing/web-platform/tests/navigation-api/navigate-event/navigate-history-replaceState.html

+1-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@
1717
assert_equals(e.destination.id, "");
1818
assert_equals(e.destination.index, -1);
1919
assert_equals(e.formData, null);
20-
// NavigateEvent sourceElement is still in development, so test whether it is available.
21-
if ("sourceElement" in e) assert_equals(e.sourceElement, null);
20+
assert_equals(e.sourceElement, null);
2221
e.preventDefault();
2322
t.step_timeout(t.step_func_done(() => {
2423
assert_equals(location.hash, "");

testing/web-platform/tests/navigation-api/navigate-event/navigate-iframe-location.html

+1-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@
2121
assert_equals(e.destination.id, "");
2222
assert_equals(e.destination.index, -1);
2323
assert_equals(e.formData, null);
24-
// NavigateEvent sourceElement is still in development, so test whether it is available.
25-
if ("sourceElement" in e) assert_equals(e.sourceElement, null);
24+
assert_equals(e.sourceElement, null);
2625
e.preventDefault();
2726
t.step_timeout(t.step_func_done(() => assert_equals(location.hash, "")), 0);
2827
});

testing/web-platform/tests/navigation-api/navigate-event/navigate-location.html

+1-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@
1717
assert_equals(e.destination.id, "");
1818
assert_equals(e.destination.index, -1);
1919
assert_equals(e.formData, null);
20-
// NavigateEvent sourceElement is still in development, so test whether it is available.
21-
if ("sourceElement" in e) assert_equals(e.sourceElement, null);
20+
assert_equals(e.sourceElement, null);
2221
});
2322
location.href = "#1";
2423
}, "location API fires navigate event");

testing/web-platform/tests/navigation-api/navigate-event/navigate-meta-refresh.html

+1-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@
2020
assert_equals(e.destination.id, "");
2121
assert_equals(e.destination.index, -1);
2222
assert_equals(e.formData, null);
23-
// NavigateEvent sourceElement is still in development, so test whether it is available.
24-
if ("sourceElement" in e) assert_equals(e.sourceElement, null);
23+
assert_equals(e.sourceElement, null);
2524
e.preventDefault();
2625
});
2726
});

testing/web-platform/tests/navigation-api/navigate-event/navigate-navigation-back-cross-document.html

+1-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@
2525
assert_equals(e.destination.index, 0);
2626
assert_equals(e.formData, null);
2727
assert_equals(e.info, "hi");
28-
// NavigateEvent sourceElement is still in development, so test whether it is available.
29-
if ("sourceElement" in e) assert_equals(e.sourceElement, null);
28+
assert_equals(e.sourceElement, null);
3029
});
3130
i.contentWindow.onbeforeunload = () => beforeunload_called = true;
3231
assert_true(i.contentWindow.navigation.canGoBack);

testing/web-platform/tests/navigation-api/navigate-event/navigate-navigation-back-same-document-in-iframe.html

+1-2
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@
2727
assert_equals(e.destination.index, 0);
2828
assert_equals(e.formData, null);
2929
assert_equals(e.info, "hi");
30-
// NavigateEvent sourceElement is still in development, so test whether it is available.
31-
if ("sourceElement" in e) assert_equals(e.sourceElement, null);
30+
assert_equals(e.sourceElement, null);
3231
}
3332
await i.contentWindow.navigation.back({ info: "hi" }).finished;
3433
}, "navigate event for navigation.back() - same-document in an iframe");

testing/web-platform/tests/navigation-api/navigate-event/navigate-navigation-back-same-document.html

+1-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@
2525
assert_equals(e.formData, null);
2626
assert_equals(e.info, "hi");
2727
assert_not_equals(e.hasUAVisualTransition, undefined);
28-
// NavigateEvent sourceElement is still in development, so test whether it is available.
29-
if ("sourceElement" in e) assert_equals(e.sourceElement, null);
28+
assert_equals(e.sourceElement, null);
3029
});
3130
assert_true(navigation.canGoBack);
3231
navigation.back({ info: "hi" });

testing/web-platform/tests/navigation-api/navigate-event/navigate-navigation-navigate.html

+1-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@
1616
assert_equals(e.destination.id, "");
1717
assert_equals(e.destination.index, -1);
1818
assert_equals(e.formData, null);
19-
// NavigateEvent sourceElement is still in development, so test whether it is available.
20-
if ("sourceElement" in e) assert_equals(e.sourceElement, null);
19+
assert_equals(e.sourceElement, null);
2120
});
2221
navigation.navigate("#foo");
2322
}, "navigate event for navigation.navigate()");

testing/web-platform/tests/navigation-api/navigate-event/navigate-svg-anchor-fragment.html

+1-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@
1717
assert_equals(e.destination.key, "");
1818
assert_equals(e.destination.id, "");
1919
assert_equals(e.destination.index, -1);
20-
// NavigateEvent sourceElement is still in development, so test whether it is available.
21-
if ("sourceElement" in e) assert_equals(e.sourceElement, document.getElementById("a"));
20+
assert_equals(e.sourceElement, document.getElementById("a"));
2221
e.preventDefault();
2322
t.step_timeout(t.step_func_done(() => assert_equals(location.hash, "")), 0);
2423
});

testing/web-platform/tests/navigation-api/navigate-event/navigate-to-srcdoc.html

+1-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@
2121
assert_equals(e.destination.id, "");
2222
assert_equals(e.destination.index, -1);
2323
assert_equals(e.formData, null);
24-
// NavigateEvent sourceElement is still in development, so test whether it is available.
25-
if ("sourceElement" in e) assert_equals(e.sourceElement, null);
24+
assert_equals(e.sourceElement, null);
2625
e.preventDefault();
2726

2827
// Make sure it doesn't navigate anyway.

testing/web-platform/tests/navigation-api/navigate-event/navigate-window-open-self.html

+1-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@
1616
assert_equals(e.destination.id, "");
1717
assert_equals(e.destination.index, -1);
1818
assert_equals(e.formData, null);
19-
// NavigateEvent sourceElement is still in development, so test whether it is available.
20-
if ("sourceElement" in e) assert_equals(e.sourceElement, null);
19+
assert_equals(e.sourceElement, null);
2120
e.preventDefault();
2221
});
2322
window.onload = t.step_func(() => window.open("#1", "_self"));

testing/web-platform/tests/navigation-api/navigate-event/navigate-window-open.html

+1-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@
2121
assert_equals(e.destination.id, "");
2222
assert_equals(e.destination.index, -1);
2323
assert_equals(e.formData, null);
24-
// NavigateEvent sourceElement is still in development, so test whether it is available.
25-
if ("sourceElement" in e) assert_equals(e.sourceElement, null);
24+
assert_equals(e.sourceElement, null);
2625
e.preventDefault();
2726
});
2827

0 commit comments

Comments
 (0)