mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-11-12 06:08:24 +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
13 lines
481 B
HTML
13 lines
481 B
HTML
<script src="/resources/testharness.js"></script>
|
|
<script src="/resources/testharnessreport.js"></script>
|
|
|
|
<iframe></iframe>
|
|
|
|
<script>
|
|
let test = async_test('document.querySelector(":target") must work when called in the window.load event');
|
|
let iframe = document.querySelector("iframe");
|
|
window.addEventListener("message", test.step_func_done(event => {
|
|
assert_equals(event.data, "PASS");
|
|
}));
|
|
iframe.src = "./query-target-in-load-event.part.html#target";
|
|
</script>
|