test_hover_near_text.html (1318B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8"/> 5 <title>Test mouse hover near text element inside svg element with viewBox attribute</title> 6 <script src="/tests/SimpleTest/SimpleTest.js"></script> 7 <script src="/tests/SimpleTest/EventUtils.js"></script> 8 </head> 9 <body style="margin:0"> 10 <div> 11 <svg viewBox="-1 -1 2 2" width="300" height="300"> 12 <text style="font-size:0.1px" onmouseover="this.setAttribute('fill', 'red')">Hi</text> 13 </svg> 14 </div> 15 <p> 16 <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1519144">Mozilla Bug 1519144</a> 17 </p> 18 <script type="application/javascript"> 19 //hover above the text 20 synthesizeMouseAtPoint(155, 125, { type: "mousemove" }); 21 //hover to the left of the text 22 synthesizeMouseAtPoint(125, 155, { type: "mousemove" }); 23 requestIdleCallback(() => { 24 ok(!document.getElementsByTagName('text')[0].hasAttribute('fill'), 25 'Text element should not receive an event'); 26 SimpleTest.finish(); 27 }); 28 SimpleTest.waitForExplicitFinish() 29 </script> 30 </body> 31 </html>