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

Unified Diff: chrome/test/data/geolocation/iframes_different_origin.html

Issue 1320005: Adds GeolocationContentSettings on TabContents. ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 9 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/browser/tab_contents/tab_contents.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/geolocation/iframes_different_origin.html
===================================================================
--- chrome/test/data/geolocation/iframes_different_origin.html (revision 42590)
+++ chrome/test/data/geolocation/iframes_different_origin.html (working copy)
@@ -1,20 +1,23 @@
-<html>
-<script>
-var iframe_hosts = ['http://127.0.0.1', 'http://localhost'];
+<html>
+<script>
+var iframe_hosts = ['http://127.0.0.1', 'http://localhost'];
+function getIFrameSrc(iframe_id) {
+ var port = location.port;
+ var path = location.pathname.substring(0, location.pathname.lastIndexOf('/'));
+ var url = iframe_hosts[iframe_id] + ':' + port + path + '/simple.html';
+ return url;
+}
function addIFrame(iframe_id) {
- var port = location.port;
- var path = location.pathname.substring(0, location.pathname.lastIndexOf('/'));
- var url = iframe_hosts[iframe_id] + ':' + port + path + '/simple.html';
var id = 'iframe_' + iframe_id;
var iframe = document.getElementById(id);
- iframe.src = url;
+ iframe.src = getIFrameSrc(iframe_id);
return "" + iframe_id;
-}
-</script>
+}
+</script>
<body>
<iframe id="iframe_0"></iframe>
-<iframe id="iframe_1"></iframe>
-Testing Geolocation with iframes.
-</body>
+<iframe id="iframe_1"></iframe>
+Testing Geolocation with iframes.
+</body>
</html>
« no previous file with comments | « chrome/browser/tab_contents/tab_contents.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698