diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:47:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:47:29 +0000 |
commit | 0ebf5bdf043a27fd3dfb7f92e0cb63d88954c44d (patch) | |
tree | a31f07c9bcca9d56ce61e9a1ffd30ef350d513aa /layout/svg/tests/test_hover_near_text.html | |
parent | Initial commit. (diff) | |
download | firefox-esr-0ebf5bdf043a27fd3dfb7f92e0cb63d88954c44d.tar.xz firefox-esr-0ebf5bdf043a27fd3dfb7f92e0cb63d88954c44d.zip |
Adding upstream version 115.8.0esr.upstream/115.8.0esr
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'layout/svg/tests/test_hover_near_text.html')
-rw-r--r-- | layout/svg/tests/test_hover_near_text.html | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/layout/svg/tests/test_hover_near_text.html b/layout/svg/tests/test_hover_near_text.html new file mode 100644 index 0000000000..2bf808e61a --- /dev/null +++ b/layout/svg/tests/test_hover_near_text.html @@ -0,0 +1,29 @@ +<!DOCTYPE html> +<html> + <head> + <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8"/> + <title>Test mouse hover near text element inside svg element with viewBox attribute</title> + <script src="/tests/SimpleTest/SimpleTest.js"></script> + </head> + <body style="margin:0"> + <div> + <svg viewBox="-1 -1 2 2" width="300" height="300"> + <text style="font-size:0.1px" onmouseover="this.setAttribute('fill', 'red')">Hi</text> + </svg> + </div> + <p> + <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1519144">Mozilla Bug 1519144</a> + </p> + <script type="application/javascript"> + let utils = SpecialPowers.getDOMWindowUtils(window); + utils.sendMouseEvent('mousemove', 155, 125, 0, 0, 0); //hover above the text + utils.sendMouseEvent('mousemove', 125, 155, 0, 0, 0); //hover to the left of the text + requestIdleCallback(() => { + ok(!document.getElementsByTagName('text')[0].hasAttribute('fill'), + 'Text element should not receive an event'); + SimpleTest.finish(); + }); + SimpleTest.waitForExplicitFinish() + </script> + </body> +</html> |