test_crash_on_mouse_move.html (1131B)
1 <!DOCTYPE HTML> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <title> 6 This is a crash test to make sure handling mouse move events on an input 7 element doesn't crash even if the input type has been changed during the 8 events 9 </title> 10 <script src="/tests/SimpleTest/SimpleTest.js"></script> 11 <script src="/tests/SimpleTest/EventUtils.js"></script> 12 <link rel="stylesheet" href="/tests/SimpleTest/test.css"/> 13 </head> 14 <body> 15 <p id="display"></p> 16 <div id="content" style="display: none"></div> 17 <input style="width:1000px;height:300px" 18 onmousemove="this.setAttribute('type','text')" 19 id="formPassword" type="password" disabled/> 20 <pre id="test"></pre> 21 </body> 22 <script> 23 SimpleTest.waitForExplicitFinish(); 24 window.onload = () => { 25 const position = formPassword.getBoundingClientRect(); 26 for (let i = 0; i < 100; i++) { 27 synthesizeMouseAtPoint(position.x + i, position.y + i, 28 { type: "mousemove" }); 29 30 } 31 ok(true, "mouse movement on a input element whose type is going to be " + 32 "changed by the mouse movement doesn't crash"); 33 SimpleTest.finish(); 34 } 35 </script> 36 </html>