Dragging & dropping a file creates an attachment element even when it's disabled
[WebKit-https.git] / LayoutTests / fast / attachment / attachment-select-on-click-inside-user-select-all.html
1 <!DOCTYPE html><!-- webkit-test-runner [ enableAttachmentElement=true ] -->
2 <html>
3 <body onload="runTest()">
4 <div style="-webkit-user-select: all;">text before <attachment id="attachment"></attachment> text after</div>
5 <script>
6 var file;
7 if (window.internals)
8     file = window.internals.createFile("resources/test-file.txt");
9
10 var attachment = document.getElementById('attachment');
11 attachment.file = file;
12
13 window.onload = function () {
14     if (!window.eventSender)
15         return;
16     eventSender.mouseMoveTo(attachment.offsetLeft + 10, attachment.offsetTop + 10);
17     eventSender.mouseDown(0);
18     eventSender.mouseUp(0);
19 }
20 </script>
21 </body>
22 </html>