Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / selection / drag-input-text-nested-in-draggable-element.html
blob93243a5ed96426627ae84a550a3e4622db0972f9
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script>
5 function log(s)
7 document.getElementById('console')
8 .appendChild(document.createElement('div'))
9 .appendChild(document.createTextNode(s));
12 function onDragStart(e)
14 if (e.target.id == 'textInput')
15 log('PASS');
16 else
17 log('FAIL: target element was ' + e.target);
20 function runTest()
22 document.getElementById('draggableElement').addEventListener('dragstart', onDragStart);
23 if (!window.testRunner)
24 return;
25 testRunner.dumpAsText();
27 var textInput = document.getElementById('textInput');
28 textInput.focus();
29 textInput.select();
30 var startX = textInput.offsetLeft + textInput.offsetWidth / 2;
31 var startY = textInput.offsetTop + textInput.offsetHeight / 2;
32 eventSender.mouseMoveTo(startX, startY);
33 eventSender.mouseDown();
34 eventSender.leapForward(200);
35 eventSender.mouseMoveTo(startX + 100, startY + 100);
36 eventSender.mouseUp();
38 </script>
39 </head>
40 <body onload="runTest()">
41 <p>Simple test that dragging selected text in an input box nested in a draggable element works.
42 <div id="draggableElement" draggable="true">
43 Draggable div wrapping a text input box:
44 <input id="textInput" type="text" value="Select and drag me"></input>
45 </div>
46 <div id="console"></div>
47 </body>
48 </html>