Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / events / mouse-drag-from-frame-to-other-frame.html
blobdbfe83c6bc0550d79cb3d43d18242f5db1153fbc
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script>
5 if (window.testRunner) {
6 testRunner.waitUntilDone();
7 testRunner.dumpAsText();
10 function log(msg) {
11 var msgNode = document.createTextNode(msg);
12 var li = document.createElement("li");
13 li.appendChild(msgNode);
14 document.getElementById("logElem").appendChild(li);
16 function dragStarted() {
17 log("Drag Started");
19 window.onmouseup = function() {
20 log("Root frame received mouse up");
22 window.onload = function() {
23 try {
24 if (!frames[0] || !frames[0].document || !frames[0].document.getElementById("dragSource")) {
25 log("Window.onload fired before subframe completed load.");
28 if (!window.testRunner) {
29 log("This test needs to be run in DRT. To test manually drag from the text 'Drag Me!' out into the parent frame.");
30 return;
32 var dragSource = frames[0].document.getElementById("dragSource");
33 var sourceFrame = document.getElementById("sourceFrame");
34 var targetFrame = document.getElementById("targetFrame");
35 var x = dragSource.offsetLeft + sourceFrame.offsetLeft + 10;
36 var y = dragSource.offsetTop + sourceFrame.offsetTop + dragSource.offsetHeight / 2;
37 var x1 = targetFrame.offsetLeft + 10;
38 var y1 = targetFrame.offsetTop + 10;
39 eventSender.mouseMoveTo(x,y);
40 eventSender.mouseDown();
41 eventSender.mouseMoveTo(x1, y1);
42 eventSender.mouseUp();
43 } finally {
44 if (window.testRunner)
45 testRunner.notifyDone();
48 </script>
49 </head>
50 <body>
51 <div>This tests that dragging from an element that returns <emph>false</emph> from its mousedown handler will not let the subsequent mousemove events be captured by the containing frame, and allows the mouse move to get to other subframes.</div>
52 <iframe id="sourceFrame" style="width: 100px; height: 50px;" src="resources/mouse-drag-from-frame-subframe.html"></iframe>
53 <iframe id="targetFrame" style="width: 100px; height: 50px;" src="resources/mouse-drag-from-frame-target-subframe.html"></iframe>
54 <ul id="logElem">
55 </ul>
56 </body>
57 </html>