3 function clickElement(element
) {
4 if (window
.eventSender
) {
5 var centerX
= element
.offsetLeft
+ element
.offsetWidth
/ 2;
6 var centerY
= element
.offsetTop
+ element
.offsetHeight
/ 2;
7 eventSender
.mouseMoveTo(centerX
, centerY
);
8 eventSender
.mouseDown();
13 var x
= document
.getElementById('x');
14 x
.setAttribute('data', x
.data
);
16 document
.body
.innerHTML
= "PASS";
18 if (window
.testRunner
)
19 testRunner
.notifyDone();
23 if (window
.testRunner
) {
24 testRunner
.dumpAsText();
25 testRunner
.waitUntilDone();
30 <body onload=
"load()">
31 <object id=
"x" data=
"x" border=
"1" type=
"application/x-webkit-test-netscape">
32 <param name=
"wmode" value=
"transparent">