| OLD | NEW |
| (Empty) | |
| 1 <!DOCTYPE html> |
| 2 <meta charset=windows-1252> |
| 3 <title>Regression test for crbug.com/661367</title> |
| 4 |
| 5 <p> |
| 6 To test manually, create a local file named 𓅦.txt then select it in th
e form |
| 7 and hit submit. If there is no crash, the test passes. |
| 8 </p> |
| 9 |
| 10 <form method=POST accept-charset="windows-1252" enctype="multipart/form-data"> |
| 11 <input type=file name=q> |
| 12 <input type=hidden name=submitted value=true> |
| 13 <input type=submit> |
| 14 </form> |
| 15 |
| 16 <script> |
| 17 if (window.eventSender) { |
| 18 testRunner.dumpAsText(); |
| 19 testRunner.waitUntilDone(); |
| 20 window.onload = () => { |
| 21 if (window.location.search !== '?posted') { |
| 22 // Start the test |
| 23 var input = document.querySelector('input[type=file]'); |
| 24 var rect = input.getClientRects()[0]; |
| 25 var targetX = rect.left + rect.width / 2; |
| 26 var targetY = rect.top + rect.height / 2; |
| 27 eventSender.beginDragWithFiles(['\ud80c\udd66.txt']); // U+13166 |
| 28 eventSender.mouseMoveTo(targetX, targetY); |
| 29 eventSender.mouseUp(); |
| 30 var form = document.querySelector('form'); |
| 31 form.action = window.location.href + '?posted'; |
| 32 form.submit(); |
| 33 } else { |
| 34 document.querySelector('p').innerText = 'PASS: did not crash'; |
| 35 testRunner.notifyDone(); |
| 36 } |
| 37 } |
| 38 } |
| 39 </script> |
| OLD | NEW |