mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-11-12 14:20:14 +02:00
Automatic update from web-platform-testsAdd regression test for https://crbug.com/843523. Test that document.querySelector(":target") works when called in the window.load event. This test is a subset of dom/nodes/Element-matches.html, the difference is that this test is more lightweight. It causes the window.load event to be sent earlier. There is a race condition. Currently, it will only work when FrameLoader::ProcessFragment is called before Document::ImplicitClose(). Probable fix: https://chromium-review.googlesource.com/c/chromium/src/+/1057507 Bug: 843523 Change-Id: Ibf7b0d7621b18c3dfefaaa323bbd335d86ce0652 Reviewed-on: https://chromium-review.googlesource.com/1061456 Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org> Reviewed-by: Nate Chapin <japhet@chromium.org> Cr-Commit-Position: refs/heads/master@{#561916} -- wpt-commits: f73282e06fe91bd60e188f39887332c63e80a419 wpt-pr: 11030
10 lines
311 B
HTML
10 lines
311 B
HTML
<!-- Used by ./query-target-in-load-event.html -->
|
|
<script>
|
|
window.onload = function() {
|
|
let target = document.querySelector(":target");
|
|
let expected = document.querySelector("#target");
|
|
window.parent.postMessage(target == expected ? "PASS" : "FAIL", "*");
|
|
};
|
|
</script>
|
|
|
|
<div id="target"></div>
|