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

Side by Side Diff: chrome/test/data/geolocation/basic_geolocation.js

Issue 2478803003: Remove DOMAutomationController::automation_id_ (Closed)
Patch Set: Rebasing... Created 3 years, 5 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 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 var last_position = 0; 5 var last_position = 0;
6 var last_error = 0; 6 var last_error = 0;
7 var watch_id = 0; 7 var watch_id = 0;
8 var position_initialized = false; 8 var position_initialized = false;
9 var position_updated = false; 9 var position_updated = false;
10 10
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 navigator.geolocation.watchPosition( 45 navigator.geolocation.watchPosition(
46 geoSuccessCallbackWithResponse, geoErrorCallbackWithResponse, 46 geoSuccessCallbackWithResponse, geoErrorCallbackWithResponse,
47 {maximumAge:600000, timeout:100000, enableHighAccuracy:true}); 47 {maximumAge:600000, timeout:100000, enableHighAccuracy:true});
48 } 48 }
49 function geoStartWithSyncResponse() { 49 function geoStartWithSyncResponse() {
50 navigator.geolocation.watchPosition( 50 navigator.geolocation.watchPosition(
51 geoSuccessCallback, geoErrorCallback, 51 geoSuccessCallback, geoErrorCallback,
52 {maximumAge:600000, timeout:100000, enableHighAccuracy:true}); 52 {maximumAge:600000, timeout:100000, enableHighAccuracy:true});
53 sendString('requested'); 53 sendString('requested');
54 } 54 }
55 function checkIfGeopositionUpdated() {
56 if (position_updated)
57 sendString('geoposition-updated');
58 }
59 function geoGetLastPositionLatitude() { 55 function geoGetLastPositionLatitude() {
60 return "" + last_position.coords.latitude; 56 return "" + last_position.coords.latitude;
61 } 57 }
62 function geoGetLastPositionLongitude() { 58 function geoGetLastPositionLongitude() {
63 return "" + last_position.coords.longitude; 59 return "" + last_position.coords.longitude;
64 } 60 }
65 function geoGetLastError() { 61 function geoGetLastError() {
66 return "" + (last_error ? last_error.code : 0); 62 return "" + (last_error ? last_error.code : 0);
67 } 63 }
68 function geoAccessNavigatorGeolocation() { 64 function geoAccessNavigatorGeolocation() {
69 return "" + typeof(navigator.geolocation); 65 return "" + typeof(navigator.geolocation);
70 } 66 }
OLDNEW
« no previous file with comments | « chrome/browser/geolocation/geolocation_browsertest.cc ('k') | chrome/test/data/geolocation/two_watches.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698