OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 package org.chromium.content.browser; | 5 package org.chromium.content.browser; |
6 | 6 |
7 import android.app.Activity; | 7 import android.app.Activity; |
8 import android.test.InstrumentationTestCase; | 8 import android.test.InstrumentationTestCase; |
9 import android.test.UiThreadTest; | 9 import android.test.UiThreadTest; |
10 import android.test.suitebuilder.annotation.SmallTest; | 10 import android.test.suitebuilder.annotation.SmallTest; |
11 | 11 |
12 import org.chromium.base.annotations.SuppressFBWarnings; | 12 import org.chromium.base.annotations.SuppressFBWarnings; |
13 import org.chromium.base.test.util.Feature; | 13 import org.chromium.base.test.util.Feature; |
14 | 14 |
| 15 import org.chromium.device.geolocation.LocationProviderAdapter; |
| 16 |
15 /** | 17 /** |
16 * Test suite for LocationProvider. | 18 * Test suite for LocationProvider. |
17 */ | 19 */ |
18 public class LocationProviderTest extends InstrumentationTestCase { | 20 public class LocationProviderTest extends InstrumentationTestCase { |
19 private Activity mActivity; | 21 private Activity mActivity; |
20 private LocationProviderAdapter mLocationProvider; | 22 private LocationProviderAdapter mLocationProvider; |
21 | 23 |
22 @SuppressFBWarnings("URF_UNREAD_FIELD") | 24 @SuppressFBWarnings("URF_UNREAD_FIELD") |
23 @Override | 25 @Override |
24 public void setUp() { | 26 public void setUp() { |
(...skipping 23 matching lines...) Expand all Loading... |
48 @Feature({"Location"}) | 50 @Feature({"Location"}) |
49 public void testStartUpgradeStop() throws Exception { | 51 public void testStartUpgradeStop() throws Exception { |
50 mLocationProvider.start(false); | 52 mLocationProvider.start(false); |
51 assertTrue("Should be running", mLocationProvider.isRunning()); | 53 assertTrue("Should be running", mLocationProvider.isRunning()); |
52 mLocationProvider.start(true); | 54 mLocationProvider.start(true); |
53 assertTrue("Should be running", mLocationProvider.isRunning()); | 55 assertTrue("Should be running", mLocationProvider.isRunning()); |
54 mLocationProvider.stop(); | 56 mLocationProvider.stop(); |
55 assertFalse("Should have stopped", mLocationProvider.isRunning()); | 57 assertFalse("Should have stopped", mLocationProvider.isRunning()); |
56 } | 58 } |
57 } | 59 } |
OLD | NEW |