OLD | NEW |
(Empty) | |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef IOS_CHROME_BROWSER_GEOLOCATION_TEST_LOCATION_MANAGER_H_ |
| 6 #define IOS_CHROME_BROWSER_GEOLOCATION_TEST_LOCATION_MANAGER_H_ |
| 7 |
| 8 #import "ios/chrome/browser/geolocation/location_manager.h" |
| 9 |
| 10 // Implements a fake LocationManager for unit tests and KIF tests. |
| 11 @interface TestLocationManager : LocationManager |
| 12 |
| 13 // Writable version of the LocationManager |authorizationStatus| property. If |
| 14 // the new value is different from the previous value, then invokes the |
| 15 // LocationManagerDelegate |locationManagerDidChangeAuthorizationStatus:| |
| 16 // method. |
| 17 @property(nonatomic, assign) CLAuthorizationStatus authorizationStatus; |
| 18 |
| 19 // Writable version of the LocationManager |currentLocation| property. |
| 20 @property(nonatomic, retain) CLLocation* currentLocation; |
| 21 |
| 22 // Writable version of the LocationManager |locationServicesEnabled| property. |
| 23 @property(nonatomic, assign) BOOL locationServicesEnabled; |
| 24 |
| 25 // Returns YES if and only if LocationManager |startUpdatingLocation| has been |
| 26 // invoked at least once since initialization or the last call to |reset|. |
| 27 @property(nonatomic, readonly) BOOL started; |
| 28 |
| 29 // Returns YES if and only if LocationManager |stopUpdatingLocation| has been |
| 30 // invoked at least once since initialization or the last call to |reset|. |
| 31 @property(nonatomic, readonly) BOOL stopped; |
| 32 |
| 33 // Resets |authorizationStatus|, |currentLocation|, |locationServicesEnabled|, |
| 34 // |started|, and |stopped| to the initialized state. Does not reset |
| 35 // |delegate|. |
| 36 - (void)reset; |
| 37 |
| 38 @end |
| 39 |
| 40 #endif // IOS_CHROME_BROWSER_GEOLOCATION_TEST_LOCATION_MANAGER_H_ |
OLD | NEW |