3 <style type="text/css">
4 html { overflow: hidden; }
5 #top { margin: 100em 3em 0; padding: 2em 0 0 .5em; }
10 document.getElementById('console').appendChild(document.createTextNode(msg + '\n'));
14 function logMousePosition(event) {
15 log ("Mouse:x = " + event.x + " , y = " + event.y);
20 if (window.layoutTestController) {
21 layoutTestController.waitUntilDone();
22 layoutTestController.dumpAsText();
23 setTimeout(scrollToAnchor, 0);
27 function scrollToAnchor()
29 if (window.eventSender) {
30 var input = document.getElementById('ANCHORLINK');
31 var x = input.offsetLeft;
32 var y = input.offsetTop;
33 eventSender.mouseMoveTo(x, y);
34 eventSender.mouseDown();
35 eventSender.mouseUp();
38 if (document.body.scrollTop == 0)
39 log("Automated test : FAILED : no scroll has occured ");
41 log("Automated test : PASSED");
43 if (window.layoutTestController)
44 layoutTestController.notifyDone();
48 <body onload="test()">
52 <a href="#bottom">Link to Bottom of the page</a>
55 https://bugs.webkit.org/show_bug.cgi?id=20270 <br>
56 This test verifies that a anchor link overrides the overflow:hidden attribute by scrolling somewhere on a page.<br>
57 To do the test manually you have to click on the anchor link above. If the scroll occurs to the bottom of the page : the test has PASSED.<br>
58 If you stay here after the click, the test has failed. <br><br><br><br>
59 <div id="console" style="height: 1000px;"></div>
60 <a name="bottom">Bottom of the page</a>