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 | |
17 /** | 15 /** |
18 * Test suite for LocationProvider. | 16 * Test suite for LocationProvider. |
19 */ | 17 */ |
20 public class LocationProviderTest extends InstrumentationTestCase { | 18 public class LocationProviderTest extends InstrumentationTestCase { |
21 private Activity mActivity; | 19 private Activity mActivity; |
22 private LocationProviderAdapter mLocationProvider; | 20 private LocationProviderAdapter mLocationProvider; |
23 | 21 |
24 @SuppressFBWarnings("URF_UNREAD_FIELD") | 22 @SuppressFBWarnings("URF_UNREAD_FIELD") |
25 @Override | 23 @Override |
26 public void setUp() { | 24 public void setUp() { |
(...skipping 23 matching lines...) Expand all Loading... |
50 @Feature({"Location"}) | 48 @Feature({"Location"}) |
51 public void testStartUpgradeStop() throws Exception { | 49 public void testStartUpgradeStop() throws Exception { |
52 mLocationProvider.start(false); | 50 mLocationProvider.start(false); |
53 assertTrue("Should be running", mLocationProvider.isRunning()); | 51 assertTrue("Should be running", mLocationProvider.isRunning()); |
54 mLocationProvider.start(true); | 52 mLocationProvider.start(true); |
55 assertTrue("Should be running", mLocationProvider.isRunning()); | 53 assertTrue("Should be running", mLocationProvider.isRunning()); |
56 mLocationProvider.stop(); | 54 mLocationProvider.stop(); |
57 assertFalse("Should have stopped", mLocationProvider.isRunning()); | 55 assertFalse("Should have stopped", mLocationProvider.isRunning()); |
58 } | 56 } |
59 } | 57 } |
OLD | NEW |