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

Unified Diff: services/device/generic_sensor/android/junit/src/org/chromium/device/sensors/PlatformSensorAndProviderTest.java

Issue 2847523002: Android: Remove GetApplicationContext part 4 (Closed)
Patch Set: Rebase and fix build Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: services/device/generic_sensor/android/junit/src/org/chromium/device/sensors/PlatformSensorAndProviderTest.java
diff --git a/services/device/generic_sensor/android/junit/src/org/chromium/device/sensors/PlatformSensorAndProviderTest.java b/services/device/generic_sensor/android/junit/src/org/chromium/device/sensors/PlatformSensorAndProviderTest.java
index 53011f6e1afb36337a0e30ee3551459fa19c923c..82dab43a79c1a52db07779e89fb99f992ac06798 100644
--- a/services/device/generic_sensor/android/junit/src/org/chromium/device/sensors/PlatformSensorAndProviderTest.java
+++ b/services/device/generic_sensor/android/junit/src/org/chromium/device/sensors/PlatformSensorAndProviderTest.java
@@ -126,7 +126,7 @@ public class PlatformSensorAndProviderTest {
@Feature({"PlatformSensorProvider"})
public void testNullSensorManager() {
doReturn(null).when(mContext).getSystemService(Context.SENSOR_SERVICE);
- PlatformSensorProvider provider = PlatformSensorProvider.create(mContext);
+ PlatformSensorProvider provider = PlatformSensorProvider.createForTest(mContext);
PlatformSensor sensor = provider.createSensor(SensorType.AMBIENT_LIGHT);
assertNull(sensor);
}
@@ -137,7 +137,7 @@ public class PlatformSensorAndProviderTest {
@Test
@Feature({"PlatformSensorProvider"})
public void testSensorNotSupported() {
- PlatformSensorProvider provider = PlatformSensorProvider.create(mContext);
+ PlatformSensorProvider provider = PlatformSensorProvider.createForTest(mContext);
PlatformSensor sensor = provider.createSensor(SensorType.AMBIENT_LIGHT);
assertNull(sensor);
}
@@ -148,7 +148,7 @@ public class PlatformSensorAndProviderTest {
@Test
@Feature({"PlatformSensorProvider"})
public void testSensorTypeMappings() {
- PlatformSensorProvider provider = PlatformSensorProvider.create(mContext);
+ PlatformSensorProvider provider = PlatformSensorProvider.createForTest(mContext);
provider.createSensor(SensorType.AMBIENT_LIGHT);
verify(mSensorManager).getSensorList(Sensor.TYPE_LIGHT);
provider.createSensor(SensorType.ACCELEROMETER);
@@ -401,7 +401,7 @@ public class PlatformSensorAndProviderTest {
private PlatformSensor createPlatformSensor(
long minDelayUsec, int androidSensorType, int mojoSensorType, int reportingMode) {
addMockSensor(minDelayUsec, androidSensorType, reportingMode);
- PlatformSensorProvider provider = PlatformSensorProvider.create(mContext);
+ PlatformSensorProvider provider = PlatformSensorProvider.createForTest(mContext);
return provider.createSensor(mojoSensorType);
}

Powered by Google App Engine
This is Rietveld 408576698