3 <script src=../editing.js
type=
"text/javascript"></script>
9 function editingTest() {
11 if (!window
.testRunner
) {
12 alert('This test requires testRunner to run!');
16 testRunner
.waitUntilDone();
17 testRunner
.dumpAsText();
19 var t
= document
.getElementById("targetframe");
20 framex
= t
.offsetLeft
+ 10;
21 framey
= t
.offsetTop
+ t
.offsetHeight
/ 2;
28 function dragDropIt() {
29 var e
= document
.getElementById("dragme");
30 window
.getSelection().setBaseAndExtent(e
, 0, e
, 4);
31 x
= e
.offsetLeft
+ 10;
32 y
= e
.offsetTop
+ e
.offsetHeight
/ 2;
33 eventSender
.mouseMoveTo(x
, y
);
34 eventSender
.mouseDown();
36 eventSender
.leapForward(500);
37 eventSender
.mouseMoveTo(framex
, framey
);
38 setTimeout(dropIt
, 100);
43 // Drop it off to the frame
44 eventSender
.mouseUp();
45 if (window
.testRunner
)
46 testRunner
.notifyDone();
51 <title>Check you can't drag into a data URL
</title>
55 <p>Check you can't drag into a data URL
</p>
56 <div><span id=
"dragme">hello
</span></div>
57 <iframe id=targetframe
src=
"data:text/html;charset=utf-8,%3Cbody%20contentEditable%3Dtrue%3E%0D%0A"></iframe>
58 <script>runEditingTest();</script>