Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / html / empty-fragment-id-goto-top.html
blobfbb7d7b10b3f8064aafeb28099f90403f4f8d56d
1 <html>
2 <head>
3 <script type="text/javascript">
4 function test() {
5 if (window.testRunner) {
6 testRunner.dumpAsText();
8 window.scrollTo(0, 1000);
10 var clickEvent = document.createEvent("HTMLEvents");
11 clickEvent.initEvent("click", "true", "true");
13 var gotoTop = document.getElementById("gotoTop");
14 gotoTop.dispatchEvent(clickEvent);
16 document.write("<div>document.scrollingElement.scrollTop: " + document.scrollingElement.scrollTop +"</div>");
19 </script>
20 </head>
21 <body onload="test()">
22 When clicking the link "Goto Top" at the middle of the page, it should go here.
23 <div style="height:1500px; width:500px; background:#ffddff"></div>
24 <a id="gotoTop" name="gotoTop" href="#">Goto Top</a>
25 <div style="height:3000px; width:500px; background:#ffffdd"></div>
26 <a name="youshouldnotfindme">Oops! Here is the bottom of the page.</a>
27 <a id="" name="youshouldnotfindmeeither">Oops!</a>
28 <a name="">Oops!</a>
29 </body>
30 </html>