android_webview: explicitly use gcc for target binaries.
[chromium-blink-merge.git] / chrome / test / data / geolocation / tab_destroyed_frame.html
blobb3ce13878ebe26cbbce13f5f6a6fd263d6a8269c
1 <html>
2 <head>
3 <script>
4 var last_position = 0;
5 var last_error = 0;
6 var watch_id = 0;
7 var navigation_count = 0;
8 var max_navigation_count = undefined;
9 var iteration = 0;
10 function geoNavigateIfNeeded(msg) {
11 if (max_navigation_count == undefined ||
12 navigation_count++ < max_navigation_count) {
13 ++iteration;
14 document.location.hash = '#' + iteration + ':' + msg;
17 function geoSuccessCallback(position) {
18 last_position = position;
19 geoNavigateIfNeeded('geoSuccessCallback');
21 function geoErrorCallback(error) {
22 last_error = error;
23 geoNavigateIfNeeded('geoErrorCallback');
25 function geoStart() {
26 watch_id = navigator.geolocation.watchPosition(
27 geoSuccessCallback, geoErrorCallback,
28 {maximumAge:600000, timeout:100000, enableHighAccuracy:true});
29 geoNavigateIfNeeded('geoStart');
30 return watch_id;
32 function geoGetLastPositionLatitude() {
33 return "" + last_position.coords.latitude;
35 function geoGetLastPositionLongitude() {
36 return "" + last_position.coords.longitude;
38 function geoGetLastError() {
39 return "" + (last_error ? last_error.code : 0);
41 function geoSetMaxNavigateCount(max_navigations) {
42 navigation_count = 0;
43 max_navigation_count = max_navigations;
44 return "" + max_navigation_count;
46 function geoAccessNavigatorGeolocation() {
47 return "" + typeof(navigator.geolocation);
49 </script>
50 </head>
51 <body>
52 <input type="button" value="manual" onclick="geoStart()"/>
53 </body>
54 </html>