Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / events / 5056619.html
blob422a2933d730374debcb35dc29b28c9d458722b1
1 <html>
2 <head>
3 <script src="../../resources/dump-as-markup.js" type="text/javascript"></script>
4 <script>
5 Markup.description("This tests drag and drop into a form element that is removed in its onfocus handler. Safari shouldn't crash and the dropped content shouldn't appear anywhere because there's no editable region left over underneath the mouse when the input element is removed on drop.");
7 function focusHandler() {
8 var input = document.getElementById("input");
9 input.parentNode.removeChild(input);
12 function runTest() {
13 if (!window.testRunner)
14 return;
16 testRunner.dumpEditingCallbacks();
18 var x, y;
19 var span = document.getElementById("span");
20 x = span.offsetParent.offsetLeft + span.offsetLeft + span.offsetWidth / 2;
21 y = span.offsetParent.offsetTop + span.offsetTop + span.offsetHeight / 2;
23 eventSender.mouseMoveTo(x, y);
24 eventSender.mouseDown();
25 eventSender.mouseUp();
26 eventSender.mouseDown();
27 eventSender.mouseUp();
29 eventSender.leapForward(1000);
31 eventSender.mouseDown();
33 eventSender.leapForward(500);
35 var input = document.getElementById("input");
36 x = input.offsetParent.offsetLeft + input.offsetLeft + input.offsetWidth / 2;
37 y = input.offsetParent.offsetTop + input.offsetTop + input.offsetHeight / 2;
39 eventSender.mouseMoveTo(x, y);
40 eventSender.leapForward(500);
41 eventSender.mouseUp();
43 Markup.dump(document.body);
45 </script>
46 </head>
47 <body>
48 <span id="span">Dragme</span><input type="text" id="input" onfocus="focusHandler()">
49 <script>runTest();</script>
50 </body>