3 <body oncopy=
"copy(event)" onpaste=
"paste(event)">
4 <div id=
"text">This file tests if text selection is causing oncopy event to get fired. This test requires DRT.
</div>
5 <div id=
"console"></div>
7 <script src=
"../editing.js"></script>
10 var oncopyCounter
= 0;
14 var console
= document
.getElementById('console');
15 console
.appendChild(document
.createTextNode(text
));
16 console
.appendChild(document
.createElement('br'));
25 if (!window
.testRunner
)
27 testRunner
.dumpAsText();
29 log("Selecting text with mouse, no copy events should occur:");
30 log("Event count: " + oncopyCounter
)
32 var text
= document
.getElementById("text")
33 eventSender
.mouseMoveTo(text
.offsetLeft
, text
.offsetTop
);
34 eventSender
.mouseDown();
35 eventSender
.mouseMoveTo(text
.offsetLeft
+ text
.offsetWidth
, text
.offsetTop
);
36 eventSender
.mouseUp();
38 log("Copying text, 1 copy event should occur:");
41 log("Event count: " + oncopyCounter
);