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

Side by Side Diff: content/public/android/javatests/src/org/chromium/content/browser/LocationProviderTest.java

Issue 1000793002: [Android] Incorporate findbugs into android builds. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address cjhopman's comment + rebase Created 5 years, 9 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 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.test.util.Feature; 13 import org.chromium.base.test.util.Feature;
13 14
14 /** 15 /**
15 * Test suite for LocationProvider. 16 * Test suite for LocationProvider.
16 */ 17 */
17 public class LocationProviderTest extends InstrumentationTestCase { 18 public class LocationProviderTest extends InstrumentationTestCase {
18 private Activity mActivity; 19 private Activity mActivity;
19 private LocationProviderAdapter mLocationProvider; 20 private LocationProviderAdapter mLocationProvider;
20 21
22 @SuppressFBWarnings("URF_UNREAD_FIELD")
21 @Override 23 @Override
22 public void setUp() { 24 public void setUp() {
23 mActivity = new Activity(); 25 mActivity = new Activity();
24 mLocationProvider = 26 mLocationProvider =
25 LocationProviderAdapter.create(getInstrumentation().getTargetCon text()); 27 LocationProviderAdapter.create(getInstrumentation().getTargetCon text());
26 } 28 }
27 29
28 /** 30 /**
29 * Verify a normal start/stop call pair without any activity pauses. 31 * Verify a normal start/stop call pair without any activity pauses.
30 */ 32 */
(...skipping 15 matching lines...) Expand all
46 @Feature({"Location"}) 48 @Feature({"Location"})
47 public void testStartUpgradeStop() throws Exception { 49 public void testStartUpgradeStop() throws Exception {
48 mLocationProvider.start(false); 50 mLocationProvider.start(false);
49 assertTrue("Should be running", mLocationProvider.isRunning()); 51 assertTrue("Should be running", mLocationProvider.isRunning());
50 mLocationProvider.start(true); 52 mLocationProvider.start(true);
51 assertTrue("Should be running", mLocationProvider.isRunning()); 53 assertTrue("Should be running", mLocationProvider.isRunning());
52 mLocationProvider.stop(); 54 mLocationProvider.stop();
53 assertFalse("Should have stopped", mLocationProvider.isRunning()); 55 assertFalse("Should have stopped", mLocationProvider.isRunning());
54 } 56 }
55 } 57 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698