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

Side by Side Diff: chrome/test/data/prerender/prerender_fragment_location_hash.html

Issue 6880139: Changing URL match method to support fragments. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Replace _refresh.html with CreateClientRedirect. Ensure location is correct." Created 9 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
« no previous file with comments | « chrome/test/data/prerender/prerender_fragment.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <html>
2 <head>
3 <title>Prerender fragment testing under location.hash change</title>
4
5 <script>
6 if (window.location.hash === "") {
7 window.location.hash = "fragment";
8 }
9
10 var pageWasPrerendered = false;
11
12 function DidPrerenderPass() {
13 pageWasPrerendered = true;
14 return window.location.hash === "#fragment";
15 }
16
17 // Make sure DidPrerenderPass() was called first. Otherwise, the page was
18 // most likely reloaded instead of using the prerendered page.
19 function DidDisplayPass() {
20 return pageWasPrerendered && window.location.hash === "#fragment";
21 }
22
23 </script>
24
25 </head>
26 <body>
27 <a name="fragment">Fragment</a>
28 </body>
29 </html>
30
OLDNEW
« no previous file with comments | « chrome/test/data/prerender/prerender_fragment.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698