Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

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

Lines changed: 2 additions & 4 deletions
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

Lines changed: 1 addition & 2 deletions
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

Lines changed: 1 addition & 2 deletions
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

Lines changed: 1 addition & 2 deletions
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

Lines changed: 1 addition & 2 deletions
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

Lines changed: 1 addition & 2 deletions
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

Lines changed: 1 addition & 2 deletions
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

Lines changed: 3 additions & 4 deletions
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

Lines changed: 1 addition & 2 deletions
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

Lines changed: 1 addition & 2 deletions
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);

0 commit comments

Comments
 (0)