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

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

Issue 14495004: Remove left-over PageCache stuff (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 8 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 | Annotate | Revision Log
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script> 3 <script>
4 4
5 function navigate() 5 function navigate()
6 { 6 {
7 if (location.hash == "") { 7 if (location.hash == "") {
8 if (window.testRunner) { 8 if (window.testRunner) {
9 testRunner.dumpAsText(); 9 testRunner.dumpAsText();
10 testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1) ;
11 testRunner.waitUntilDone(); 10 testRunner.waitUntilDone();
12 } 11 }
13 12
14 scrollTo(0,100); 13 scrollTo(0,100);
15 history.pushState({ }, "", window.location + "#1"); 14 history.pushState({ }, "", window.location + "#1");
16 setTimeout("window.location.href = 'resources/empty-document-goes-back.h tml'", 0); 15 setTimeout("window.location.href = 'resources/empty-document-goes-back.h tml'", 0);
17 return; 16 return;
18 } 17 }
19 18
20 setTimeout(function () { 19 setTimeout(function () {
21 var scrollPosition = document.body.scrollTop; 20 var scrollPosition = document.body.scrollTop;
22 var result = document.getElementById("result"); 21 var result = document.getElementById("result");
23 if (scrollPosition == 100) 22 if (scrollPosition == 100)
24 result.innerHTML = "Success! The scroll position was restored after navigation." 23 result.innerHTML = "Success! The scroll position was restored after navigation."
25 if (window.testRunner) 24 if (window.testRunner)
26 testRunner.notifyDone(); 25 testRunner.notifyDone();
27 }, 0); 26 }, 0);
28 } 27 }
29 28
30 </script> 29 </script>
31 </head> 30 </head>
32 <body style="width:800px" onpageshow="navigate();"> 31 <body style="width:800px" onpageshow="navigate();">
33 <div id="result">Fail. The scroll position was not restored after navigation .</div><br/><br/> 32 <div id="result">Fail. The scroll position was not restored after navigation .</div><br/><br/>
34 <div style="width:600; height:1000; background-color:purple;"></div> 33 <div style="width:600; height:1000; background-color:purple;"></div>
35 </body> 34 </body>
36 </htmL> 35 </htmL>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698