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

Side by Side Diff: content/test/data/cross_site_iframe_factory.html

Issue 1320023003: SitePerProcessBrowserTest: make some tests to use cross_site_iframe_factory (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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
OLDNEW
1 <html> 1 <html>
2 <!-- This page can create whatever iframe structure you want, across whatever 2 <!-- This page can create whatever iframe structure you want, across whatever
3 sites you want. This is useful for testing site isolation. 3 sites you want. This is useful for testing site isolation.
4 4
5 Example usage in a browsertest, explained: 5 Example usage in a browsertest, explained:
6 6
7 GURL url = 7 GURL url =
8 test_server()->GetURL("a.com", "/cross_site_iframe_factory.html?a(b(c,d))"); 8 test_server()->GetURL("a.com", "/cross_site_iframe_factory.html?a(b(c,d))");
9 9
10 When you navigate to the above URL, the outer document (on a.com) will create a 10 When you navigate to the above URL, the outer document (on a.com) will create a
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 url += window.location.protocol + '//'; // scheme (preserved) 150 url += window.location.protocol + '//'; // scheme (preserved)
151 url += goCrossSite ? site : window.location.host; // host 151 url += goCrossSite ? site : window.location.host; // host
152 if (window.location.port) 152 if (window.location.port)
153 url += ':' + window.location.port; // port (preserved) 153 url += ':' + window.location.port; // port (preserved)
154 url += window.location.pathname; // path (preserved) 154 url += window.location.pathname; // path (preserved)
155 url += '?' + encodeURIComponent(subtreeString); // query 155 url += '?' + encodeURIComponent(subtreeString); // query
156 156
157 // Add the iframe to the document. 157 // Add the iframe to the document.
158 var iframe = document.createElement('iframe'); 158 var iframe = document.createElement('iframe');
159 iframe.src = url; 159 iframe.src = url;
160 iframe.id = "child-" + i;
160 iframe.style.borderColor = borderColorForSite(site); 161 iframe.style.borderColor = borderColorForSite(site);
161 iframe.width = frameTree.children[i].layoutX; 162 iframe.width = frameTree.children[i].layoutX;
162 iframe.height = frameTree.children[i].layoutY; 163 iframe.height = frameTree.children[i].layoutY;
163 document.body.appendChild(iframe); 164 document.body.appendChild(iframe);
164 } 165 }
165 } 166 }
166 167
167 main(); 168 main();
168 </script> 169 </script>
169 </body></html> 170 </body></html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698