Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / pasteboard / drag-selected-image-to-contenteditable.html
blob8d7d8ced774c3daf2331aa66103e38621bf9683c
1 <html>
2 <head>
3 <script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
4 <script>
5 if (window.testRunner)
6 testRunner.dumpEditingCallbacks();
7 </script>
9 <script>
10 function log(message) {
11 var console = document.getElementById("console");
12 var li = document.createElement("li");
13 var text = document.createTextNode(message);
15 console.appendChild(li);
16 li.appendChild(text);
19 function runTest() {
20 if (window.testRunner)
21 testRunner.waitUntilDone();
22 // Let the subframe come into being.
23 window.setTimeout(step2, 100);
24 e = document.getElementById("dragme");
25 setSelectionCommand(e, 0, e, 1);
28 function step2()
30 if (!window.testRunner) {
31 log("This test uses the eventSender. To run it manually, drag the selected image into the editable div and drop it. It should appear inside the editable div.");
32 return;
35 log("Abe should appear twice, once inside the div and once outside it.");
37 e = document.getElementById("dragme");
38 x = e.offsetLeft + e.offsetWidth / 2;
39 y = e.offsetTop + e.offsetHeight / 2;
41 eventSender.mouseMoveTo(x, y);
42 eventSender.mouseDown();
43 e = document.getElementById("target");
44 x = e.offsetLeft + e.offsetWidth / 2;
45 y = e.offsetTop + e.offsetHeight / 2;
47 eventSender.mouseMoveTo(x, y);
48 eventSender.mouseUp();
50 testRunner.notifyDone();
52 </script>
53 </head>
55 <body style="padding:0; margin:0" onload="runTest();">
57 <div id="target" style="border: 1px solid black; width: 300px; height: 120px;" contenteditable="true"></div>
58 <img id="dragme" src="../resources/abe.png">
60 <ul id="console"></ul>
61 </body>