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

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

Issue 341833004: [WebsiteSettings] Enable permission bubbles by default. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 4 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/browser/ui/website_settings/permission_bubble_manager_unittest.cc ('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 <head> 2 <head>
3 <script> 3 <script>
4 var last_position = 0; 4 var last_position = 0;
5 var last_error = 0; 5 var last_error = 0;
6 var watch_id = 0; 6 var watch_id = 0;
7 var navigation_count = 0; 7 var navigation_count = 0;
8 var max_navigation_count = undefined; 8 var max_navigation_count = undefined;
9 var iteration = 0; 9 var iteration = 0;
10 function geoNavigateIfNeeded(msg) { 10 function geoNavigateIfNeeded(msg) {
11 if (max_navigation_count == undefined || 11 if (max_navigation_count == undefined ||
12 navigation_count++ < max_navigation_count) { 12 navigation_count++ < max_navigation_count) {
13 ++iteration; 13 ++iteration;
14 document.location.hash = '#' + iteration + ':' + msg; 14 document.location.hash = '#' + iteration + ':' + msg;
15 } 15 }
16 } 16 }
17 function geoSuccessCallback(position) { 17 function geoSuccessCallback(position) {
18 last_position = position; 18 last_position = position;
19 geoNavigateIfNeeded('geoSuccessCallback'); 19 geoNavigateIfNeeded('geoSuccessCallback');
20 } 20 }
21 function geoErrorCallback(error) { 21 function geoErrorCallback(error) {
22 console.log('error = ' + error);
22 last_error = error; 23 last_error = error;
23 geoNavigateIfNeeded('geoErrorCallback'); 24 geoNavigateIfNeeded('geoErrorCallback');
24 } 25 }
25 function geoStart() { 26 function geoStart() {
26 watch_id = navigator.geolocation.watchPosition( 27 watch_id = navigator.geolocation.watchPosition(
27 geoSuccessCallback, geoErrorCallback, 28 geoSuccessCallback, geoErrorCallback,
28 {maximumAge:600000, timeout:100000, enableHighAccuracy:true}); 29 {maximumAge:600000, timeout:100000, enableHighAccuracy:true});
29 return watch_id; 30 return watch_id;
30 } 31 }
31 function geoGetLastPositionLatitude() { 32 function geoGetLastPositionLatitude() {
(...skipping 13 matching lines...) Expand all
45 function geoAccessNavigatorGeolocation() { 46 function geoAccessNavigatorGeolocation() {
46 return "" + typeof(navigator.geolocation); 47 return "" + typeof(navigator.geolocation);
47 } 48 }
48 </script> 49 </script>
49 </head> 50 </head>
50 <body> 51 <body>
51 <input type="button" value="manual" onclick="geoStart()"/> 52 <input type="button" value="manual" onclick="geoStart()"/>
52 </body> 53 </body>
53 </html> 54 </html>
54 55
OLDNEW
« no previous file with comments | « chrome/browser/ui/website_settings/permission_bubble_manager_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698