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

Side by Side Diff: chrome/test/data/geolocation/tab_destroyed.html

Issue 208413002: Update several iframes in geolocation browser_tests to be named (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/test/data/geolocation/iframes_different_origin.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <html> 1 <html>
2 <script> 2 <script>
3 var iframe_hosts = ['http://127.0.0.1', 'http://localhost', 'http://127.0.0.1']; 3 var iframe_hosts = ['http://127.0.0.1', 'http://localhost', 'http://127.0.0.1'];
4 function getIFrameSrc(iframe_id) { 4 function getIFrameSrc(iframe_id) {
5 var port = location.port; 5 var port = location.port;
6 var path = location.pathname.substring(0, location.pathname.lastIndexOf('/')); 6 var path = location.pathname.substring(0, location.pathname.lastIndexOf('/'));
7 var file = 'simple.html'; 7 var file = 'simple.html';
8 if (iframe_id >= 1) 8 if (iframe_id >= 1)
9 file = 'tab_destroyed_frame.html'; 9 file = 'tab_destroyed_frame.html';
10 var url = iframe_hosts[iframe_id] + ':' + port + path + '/' + file; 10 var url = iframe_hosts[iframe_id] + ':' + port + path + '/' + file;
11 return url; 11 return url;
12 } 12 }
13 function addIFrame(iframe_id, iframe_src) { 13 function addIFrame(iframe_id, iframe_src) {
14 var id = 'iframe_' + iframe_id; 14 var id = 'iframe_' + iframe_id;
15 var iframe = document.getElementById(id); 15 var iframe = document.getElementById(id);
16 if (iframe_src) { 16 if (iframe_src) {
17 iframe.src = iframe_src; 17 iframe.src = iframe_src;
18 } else { 18 } else {
19 iframe.src = getIFrameSrc(iframe_id); 19 iframe.src = getIFrameSrc(iframe_id);
20 } 20 }
21 return "" + iframe_id; 21 return "" + iframe_id;
22 } 22 }
23 </script> 23 </script>
24 <body> 24 <body>
25 <iframe id="iframe_0"></iframe> 25 <iframe id="iframe_0" name="iframe_0"></iframe>
26 <iframe id="iframe_1"></iframe> 26 <iframe id="iframe_1" name="iframe_1"></iframe>
27 <iframe id="iframe_2"></iframe> 27 <iframe id="iframe_2" name="iframe_2"></iframe>
28 Testing Geolocation with iframes. 28 Testing Geolocation with iframes.
29 </body> 29 </body>
30 </html> 30 </html>
31 31
OLDNEW
« no previous file with comments | « chrome/test/data/geolocation/iframes_different_origin.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698