diff options
author | Minh Nguyễn <mxn@1ec5.org> | 2015-04-24 14:27:25 -0700 |
---|---|---|
committer | Minh Nguyễn <mxn@1ec5.org> | 2015-04-24 14:27:25 -0700 |
commit | f9c544a9ea0f9a321616fbc7147f67b5c90b7832 (patch) | |
tree | e16cb33342abf24d4b7ecaf4062d49747d75eb00 /test/ios | |
parent | 1dc2cbc280292c76eaca21fde9dddfbd30060fb0 (diff) | |
download | qtlocation-mapboxgl-f9c544a9ea0f9a321616fbc7147f67b5c90b7832.tar.gz |
Reset map view frame on every test
To counteract the call to `-insetMapView` in `-testInsetMapView`.
Diffstat (limited to 'test/ios')
-rw-r--r-- | test/ios/MGLTViewController.h | 1 | ||||
-rw-r--r-- | test/ios/MGLTViewController.m | 5 | ||||
-rw-r--r-- | test/ios/MapViewTests.m | 1 |
3 files changed, 7 insertions, 0 deletions
diff --git a/test/ios/MGLTViewController.h b/test/ios/MGLTViewController.h index f8d5618993..0be0e1ff2c 100644 --- a/test/ios/MGLTViewController.h +++ b/test/ios/MGLTViewController.h @@ -3,5 +3,6 @@ @interface MGLTViewController : UIViewController - (void)insetMapView; +- (void)resetMapView; @end diff --git a/test/ios/MGLTViewController.m b/test/ios/MGLTViewController.m index 2cb2b939c7..e8b500b430 100644 --- a/test/ios/MGLTViewController.m +++ b/test/ios/MGLTViewController.m @@ -23,4 +23,9 @@ _mapView.frame = CGRectInset(_mapView.frame, 50, 50); } +- (void)resetMapView +{ + _mapView.frame = self.view.bounds; +} + @end diff --git a/test/ios/MapViewTests.m b/test/ios/MapViewTests.m index 2d87b43c15..fff52adc0e 100644 --- a/test/ios/MapViewTests.m +++ b/test/ios/MapViewTests.m @@ -14,6 +14,7 @@ - (void)beforeEach { [system simulateDeviceRotationToOrientation:UIDeviceOrientationPortrait]; + [tester.viewController resetMapView]; tester.mapView.centerCoordinate = CLLocationCoordinate2DMake(38.913175, -77.032458); tester.mapView.zoomLevel = 14; |