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

Side by Side 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.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | static/abp-test-suite-filters.txt » ('j') | templates/sitekey_frame.tmpl » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 title=ABP Test Pages 1 title=ABP Test Pages
2 template=blank 2 template=frame
3
4 <head>
5 <style>
6 html, body { margin: 0; height: 100%; }
7 #iframe { display: block; width: 100%; height: 100%; border: none; }
8 </style>
9 </head>
10
11 <iframe id="iframe"></iframe>
12 3
13 <script type="text/javascript"> 4 <script type="text/javascript">
14 var iframe = document.getElementById("iframe") 5 function frame_url(parent_location)
15 function update_iframe_location()
16 { 6 {
17 var hash = window.location.hash; 7 var href = parent_location.href;
18 if (hash) 8 var hash = parent_location.hash;
19 { 9 return href.substr(0, href.length - hash.length).
20 var url = window.location.href. 10 replace("://testpages", "://www.testpages") + hash.substring(1);
21 substr(0, window.location.href.length - hash.length).
22 replace("://testpages", "://www.testpages") + hash.substring(1);
23
24 iframe.src = url;
25 }
26 } 11 }
27 window.addEventListener("hashchange", update_iframe_location);
28 update_iframe_location();
29 </script> 12 </script>
OLDNEW
« 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