4 if (window
.testRunner
) {
5 testRunner
.dumpAsText();
6 testRunner
.waitUntilDone();
10 var link
= document
.getElementById("anchorLink");
11 eventSender
.mouseMoveTo(link
.offsetLeft
+ 2, link
.offsetTop
+ 2);
12 eventSender
.mouseDown();
13 eventSender
.mouseUp();
20 var scrollY
= window
.scrollY
;
21 var line
= document
.createElement('div');
22 line
.appendChild(document
.createTextNode("Scroll position is " + scrollY
+ "px"));
23 document
.getElementById('anchor').appendChild(line
);
24 testRunner
.notifyDone();
29 <body onload=
"run();">
30 <div style=
"height: 600px">
31 <a id=
"anchorLink" href=
"#anchor">Anchor link
</a>
33 <div id=
"anchor" style=
"height: 600px"></div>