Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: pages/testcases/generic/index.html

Issue 29328600: Issue 3122 - Add sitekey frame files ready for sitekey testcases (Closed)
Patch Set: Attempt to make frame URL logic clearer Created Oct. 13, 2015, 11:28 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | static/abp-test-suite-filters.txt » ('j') | templates/sitekey_frame.tmpl » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pages/testcases/generic/index.html
diff --git a/pages/testcases/generic/index.html b/pages/testcases/generic/index.html
index 62761a24d2cb9a010f4f07a8f52eab3657775269..d9df6c9204062de53f4e00898643e8521200e163 100644
--- a/pages/testcases/generic/index.html
+++ b/pages/testcases/generic/index.html
@@ -1,29 +1,12 @@
title=ABP Test Pages
-template=blank
-
-<head>
- <style>
- html, body { margin: 0; height: 100%; }
- #iframe { display: block; width: 100%; height: 100%; border: none; }
- </style>
-</head>
-
-<iframe id="iframe"></iframe>
+template=frame
<script type="text/javascript">
- var iframe = document.getElementById("iframe")
- function update_iframe_location()
+ function frame_url(parent_location)
{
- var hash = window.location.hash;
- if (hash)
- {
- var url = window.location.href.
- substr(0, window.location.href.length - hash.length).
- replace("://testpages", "://www.testpages") + hash.substring(1);
-
- iframe.src = url;
- }
+ var href = parent_location.href;
+ var hash = parent_location.hash;
+ return href.substr(0, href.length - hash.length).
+ replace("://testpages", "://www.testpages") + hash.substring(1);
}
- window.addEventListener("hashchange", update_iframe_location);
- update_iframe_location();
</script>
« no previous file with comments | « no previous file | static/abp-test-suite-filters.txt » ('j') | templates/sitekey_frame.tmpl » ('J')

Powered by Google App Engine
This is Rietveld