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); |
} |