Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Side by Side Diff: LayoutTests/fast/loader/scroll-position-restored-on-back-non-cached.html

Issue 927213004: Accept options in history APIs to allow scroll restoration to be disabled (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 <html>
2 <head>
3 <script>
4
5 function navigate()
6 {
7 if (location.hash == "") {
8 if (window.testRunner) {
9 testRunner.dumpAsText();
10 testRunner.waitUntilDone();
11 }
12
13 scrollTo(0,100);
14 history.pushState({ }, "", window.location + "#1");
15 setTimeout("window.location.href = 'resources/empty-document-goes-back.h tml'", 0);
16 return;
17 }
18
19 setTimeout(function () {
20 var scrollPosition = document.body.scrollTop;
21 var result = document.getElementById("result");
22 if (scrollPosition == 100)
23 result.innerHTML = "Success! The scroll position was restored after navigation."
24 if (window.testRunner)
25 testRunner.notifyDone();
26 }, 0);
27 }
28
29 </script>
30 </head>
31 <body style="width:800px" onpageshow="navigate();">
32 <div id="result">Fail. The scroll position was not restored after navigation .</div><br/><br/>
33 <div style="width:600; height:1000; background-color:purple;"></div>
34 </body>
35 </htmL>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698