4 <p id=
"description">This tests dragging and dropping a URL. The content before and after the drag and drop should match.
</p>
5 <div contenteditable
><a href=
"http://webkit.org/" title=
"some title" target=
"_blank" style=
"color:orange">drag me
</a></div>
6 <p>to the box blow:
</p>
7 <div id=
"destination" contenteditable
ondrop=
"setTimeout(dump, 0);" style=
"border: solid 2px blue; padding: 5px;"><br></div>
8 <script src=
"../../resources/dump-as-markup.js"></script>
11 Markup
.waitUntilDone();
13 Markup
.description(document
.getElementById('description').textContent
);
15 var target
= document
.getElementsByTagName("a")[0];
16 getSelection().selectAllChildren(target
);
17 Markup
.dump(target
.parentNode
, 'before');
20 Markup
.dump('destination', 'after');
24 if (window
.eventSender
) {
25 var x
= target
.offsetLeft
+ target
.offsetWidth
/ 2;
26 var y
= target
.offsetTop
+ target
.offsetHeight
/ 2;
27 eventSender
.mouseMoveTo(x
, y
);
28 eventSender
.mouseDown();
30 var destination
= document
.getElementById("destination");
31 eventSender
.leapForward(300);
32 eventSender
.mouseMoveTo(destination
.offsetLeft
+ 10, destination
.offsetTop
+ destination
.offsetHeight
/ 2);
33 eventSender
.mouseUp();
35 setTimeout(function () { destination
.innerHTML
= 'FAIL'; dump(); }, 100);