4 <p id=
"description">This tests dragging a selected table by mousing down on the contents of one of its cells. It should be in the red bordered area.
</p>
6 <div id=
"source" style=
"border: 1px solid blue;" contenteditable=
"true"><table border=
"1"><tr><td id=
"cell">foo
</td></tr></table></div>
7 <div id=
"destination" style=
"border: 1px solid red;" contenteditable=
"true"><br></div>
10 <script src=
"../../resources/dump-as-markup.js"></script>
13 if (!window
.testRunner
)
16 var cell
= document
.getElementById("cell");
17 var source
= document
.getElementById("source");
19 document
.execCommand("SelectAll");
22 x
= cell
.offsetParent
.offsetLeft
+ cell
.offsetLeft
+ cell
.offsetWidth
/ 2;
23 y
= cell
.offsetParent
.offsetTop
+ cell
.offsetTop
+ cell
.offsetHeight
/ 2;
24 eventSender
.mouseMoveTo(x
, y
);
25 eventSender
.mouseDown();
26 eventSender
.leapForward(1000);
28 var destination
= document
.getElementById("destination");
29 x
= destination
.offsetParent
.offsetLeft
+ destination
.offsetLeft
+ destination
.offsetWidth
/ 2;
30 y
= destination
.offsetParent
.offsetTop
+ destination
.offsetTop
+ destination
.offsetHeight
/ 2;
32 eventSender
.mouseMoveTo(x
, y
);
33 eventSender
.mouseUp();
34 Markup
.description(description
.textContent
);