Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / events / drag-image-filename.html
blob776a8f9a465fb293175e643aaf86ecaa01028cc3
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script>
5 function runTest() {
6 if (window.testRunner) {
7 testRunner.dumpAsText();
8 testRunner.waitUntilDone();
9 } else
10 return;
12 e = document.getElementById("source");
13 x = e.offsetLeft + e.offsetWidth / 2;
14 y = e.offsetTop + e.offsetHeight / 2;
16 eventSender.mouseMoveTo(x, y);
17 eventSender.mouseDown();
18 e = document.getElementById("target");
19 x = e.offsetLeft + e.offsetWidth / 2;
20 y = e.offsetTop + e.offsetHeight / 2;
22 eventSender.mouseMoveTo(x, y);
23 eventSender.mouseUp();
26 function dragEnterOrOver(event) {
27 event.dataTransfer.dropEffect = "copy";
28 event.preventDefault();
31 function drop(event) {
32 event.preventDefault();
33 eventSender.dumpFilenameBeingDragged();
34 testRunner.notifyDone();
36 </script>
37 <style>
38 #target {
39 height: 100px;
40 width: 100px;
42 </style>
43 </head>
45 <body onload="runTest()">
47 <p>This test requires DumpRenderTree. To test manually, drag the image to the desktop. It should receive the name "onload-image.png".
49 <div id="target" ondragenter="dragEnterOrOver(event)" ondragover="dragEnterOrOver(event)" ondrop="drop(event)"></div>
50 <img id="source" src="resources/onload-image.png" alt="Does it work?">
52 </body>
53 </html>