Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / loader / repeat-same-document-navigation.html
blob8e66fe0f576d012c4a12631220614bd36b1893a6
1 <html>
2 <head>
3 <script>
4 if (window.testRunner) {
5 testRunner.dumpAsText();
6 testRunner.waitUntilDone();
9 function clickLink() {
10 var link = document.getElementById("anchorLink");
11 eventSender.mouseMoveTo(link.offsetLeft + 2, link.offsetTop + 2);
12 eventSender.mouseDown();
13 eventSender.mouseUp();
16 function run() {
17 clickLink();
18 window.scroll(0, 0);
19 clickLink();
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();
27 </script>
28 </head>
29 <body onload="run();">
30 <div style="height: 600px">
31 <a id="anchorLink" href="#anchor">Anchor link</a>
32 </div>
33 <div id="anchor" style="height: 600px"></div>
34 </body>
35 </html>