LibWeb: Add hit-testing test for SVG path
Adds a test for <rect> to ensure we have at least some hit-testing coverage for SVGs.
This commit is contained in:
parent
88ad871e2b
commit
5bea99367a
Notes:
sideshowbarker
2024-07-17 07:48:42 +09:00
Author: https://github.com/kalenikaliaksandr Commit: https://github.com/SerenityOS/serenity/commit/5bea99367a Pull-request: https://github.com/SerenityOS/serenity/pull/23189 Reviewed-by: https://github.com/ADKaster ✅
2 changed files with 15 additions and 0 deletions
1
Tests/LibWeb/Text/expected/hit_testing/svg-path.txt
Normal file
1
Tests/LibWeb/Text/expected/hit_testing/svg-path.txt
Normal file
|
@ -0,0 +1 @@
|
|||
<rect> clicked
|
14
Tests/LibWeb/Text/input/hit_testing/svg-path.html
Normal file
14
Tests/LibWeb/Text/input/hit_testing/svg-path.html
Normal file
|
@ -0,0 +1,14 @@
|
|||
<!DOCTYPE html>
|
||||
<svg width="200" height="100">
|
||||
<rect id="test" width="200" height="100" style="fill:blue;" />
|
||||
</svg>
|
||||
<script src="../include.js"></script>
|
||||
<script>
|
||||
asyncTest((done) => {
|
||||
document.getElementById("test").addEventListener("click", () => {
|
||||
println("<rect> clicked");
|
||||
done();
|
||||
});
|
||||
internals.click(50, 50);
|
||||
});
|
||||
</script>
|
Loading…
Add table
Reference in a new issue