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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/test/data/prerender/prerender_fragment.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/prerender/prerender_fragment_location_hash.html
diff --git a/chrome/test/data/prerender/prerender_fragment_location_hash.html b/chrome/test/data/prerender/prerender_fragment_location_hash.html
new file mode 100644
index 0000000000000000000000000000000000000000..6ba0a664a0e3799f1f0d09bec4470d162528c533
--- /dev/null
+++ b/chrome/test/data/prerender/prerender_fragment_location_hash.html
@@ -0,0 +1,30 @@
+<html>
+<head>
+<title>Prerender fragment testing under location.hash change</title>
+
+<script>
+if (window.location.hash === "") {
+ window.location.hash = "fragment";
+}
+
+var pageWasPrerendered = false;
+
+function DidPrerenderPass() {
+ pageWasPrerendered = true;
+ return window.location.hash === "#fragment";
+}
+
+// Make sure DidPrerenderPass() was called first. Otherwise, the page was
+// most likely reloaded instead of using the prerendered page.
+function DidDisplayPass() {
+ return pageWasPrerendered && window.location.hash === "#fragment";
+}
+
+</script>
+
+</head>
+<body>
+ <a name="fragment">Fragment</a>
+</body>
+</html>
+
« 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