5 if (window.layoutTestController) {
6 layoutTestController.waitUntilDone();
7 layoutTestController.dumpAsText();
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() {
19 window.onmouseup = function() {
20 log("Root frame received mouse up");
22 window.onload = function() {
24 if (!frames[0] || !frames[0].document || !frames[0].document.getElementById("dragSource")) {
25 log("Window.onload fired before subframe completed load.");
28 if (!window.layoutTestController) {
29 log("This test needs to be run in DRT. To test manually drag from the text 'Drag Me!' out into the parent frame.");
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();
44 if (window.layoutTestController)
45 layoutTestController.notifyDone();
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>