mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 10:07:15 +02:00
LibWeb: Import WPT elementsFromPoint test
This specific test failed for some of the previous iterations of this changeset, so let's import it and use it as a regression test.
This commit is contained in:
committed by
Tim Ledbetter
parent
01ebf1eb07
commit
e1c93c0ee8
Notes:
github-actions[bot]
2025-07-05 22:58:14 +00:00
Author: https://github.com/gmta Commit: https://github.com/LadybirdBrowser/ladybird/commit/e1c93c0ee8a Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5298 Reviewed-by: https://github.com/tcl3 ✅
@@ -0,0 +1,18 @@
|
||||
<!DOCTYPE html>
|
||||
<link rel="author" title="Morten Stenshorne" href="mstensho@chromium.org">
|
||||
<link rel="help" href="https://www.w3.org/TR/cssom-view-1/#extensions-to-the-document-interface">
|
||||
<div id="container" style="width:200px; height:200px; writing-mode:horizontal-tb; direction:ltr;">
|
||||
<span id="target">target</span>
|
||||
</div>
|
||||
<script src="../../resources/testharness.js"></script>
|
||||
<script src="../../resources/testharnessreport.js"></script>
|
||||
<script>
|
||||
test(()=> {
|
||||
var elements = document.elementsFromPoint(15, 15);
|
||||
assert_equals(elements.length, 4);
|
||||
assert_equals(elements[0].id, "target");
|
||||
assert_equals(elements[1].id, "container");
|
||||
assert_equals(elements[2].nodeName, "BODY");
|
||||
assert_equals(elements[3].nodeName, "HTML");
|
||||
}, "elementsFromPoint should return all elements under a point");
|
||||
</script>
|
||||
Reference in New Issue
Block a user