mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-17 15:02:24 +00: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:
parent
01ebf1eb07
commit
e1c93c0ee8
Notes:
github-actions[bot]
2025-07-05 22:58:14 +00:00
Author: https://github.com/gmta
Commit: e1c93c0ee8
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5298
Reviewed-by: https://github.com/tcl3 ✅
2 changed files with 24 additions and 0 deletions
|
@ -0,0 +1,6 @@
|
|||
Harness status: OK
|
||||
|
||||
Found 1 tests
|
||||
|
||||
1 Pass
|
||||
Pass elementsFromPoint should return all elements under a point
|
|
@ -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>
|
Loading…
Add table
Add a link
Reference in a new issue