4 <p>This test ensures WebKit does not crash when selecting text across an element with type=file.
5 To manually test, start selection in
"start" and extend the selection by dragging to
"end" moving across the input element.
6 WebKit should not crash.
</p>
7 <span id=
"test">start
<input type=file
>end
</span>
10 if (window
.testRunner
&& window
.eventSender
) {
11 testRunner
.dumpAsText();
13 var test
= document
.getElementById('test');
14 var input
= test
.getElementsByTagName('input')[0];
16 var y
= test
.offsetTop
+ test
.offsetHeight
/ 2;
17 eventSender
.mouseMoveTo(test
.offsetLeft
+ 5, y
);
18 eventSender
.mouseDown();
20 eventSender
.leapForward(200);
21 eventSender
.mouseMoveTo(input
.offsetLeft
+ input
.offsetWidth
/ 2, y
);
22 eventSender
.leapForward(200);
24 eventSender
.mouseMoveTo(test
.offsetLeft
+ test
.offsetWidth
- 5, y
);
25 eventSender
.mouseDown();
27 test
.parentNode
.removeChild(test
);
29 document
.write('PASS');