5 if (window
.testRunner
) {
6 testRunner
.waitUntilDone();
7 testRunner
.dumpAsText();
11 if (window
.eventSender
) {
12 var anchor
= document
.getElementById("start");
13 var x
= window
.frameElement
.offsetLeft
+ anchor
.offsetLeft
+ 2;
14 var y
= window
.frameElement
.offsetTop
+ anchor
.offsetTop
+ 2;
15 eventSender
.mouseMoveTo(x
, y
);
16 eventSender
.mouseDown();
17 eventSender
.mouseUp();
18 setTimeout(finish
, 1000);
23 if (window
.top
.scrollY
== 0)
24 result
= "FAIL: navigating to the anchor should trigger a scroll";
28 window
.top
.document
.body
.appendChild(document
.createTextNode(result
));
29 if (window
.testRunner
)
30 testRunner
.notifyDone();
36 <body onload=
"run();">
38 <a id=
"start" href=
"#anchor">Go to anchor
</a>
39 <div style=
"height: 1000px"></div>
40 <a name=
"anchor">Anchor
</a>