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

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

Issue 2847523002: Android: Remove GetApplicationContext part 4 (Closed)
Patch Set: fix cronet 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: device/generic_sensor/android/junit/src/org/chromium/device/sensors/PlatformSensorAndProviderTest.java
diff --git a/device/generic_sensor/android/junit/src/org/chromium/device/sensors/PlatformSensorAndProviderTest.java b/device/generic_sensor/android/junit/src/org/chromium/device/sensors/PlatformSensorAndProviderTest.java
index 0c747f6399cfe0865e667c4681f16f691af23943..da79cf33da39fd78b739ae6ae2745245030ffab5 100644
--- a/device/generic_sensor/android/junit/src/org/chromium/device/sensors/PlatformSensorAndProviderTest.java
+++ b/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.create();
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.create();
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.create();
provider.createSensor(SensorType.AMBIENT_LIGHT);
verify(mSensorManager).getSensorList(Sensor.TYPE_LIGHT);
provider.createSensor(SensorType.ACCELEROMETER);
@@ -399,7 +399,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.create();
return provider.createSensor(mojoSensorType);
}

Powered by Google App Engine
This is Rietveld 408576698