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

Unified Diff: device/sensors/sensor_manager_android_unittest.cc

Issue 2845763002: Remove DeviceLightEvent implementation (Closed)
Patch Set: same as previous patch Created 3 years, 8 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
« no previous file with comments | « device/sensors/sensor_manager_android.cc ('k') | services/device/device_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/sensors/sensor_manager_android_unittest.cc
diff --git a/device/sensors/sensor_manager_android_unittest.cc b/device/sensors/sensor_manager_android_unittest.cc
index fc45d515043cb8f02b615670c579c625dbbda19c..620c6f9faa2fe9ecba543e24ef151b6a349998de 100644
--- a/device/sensors/sensor_manager_android_unittest.cc
+++ b/device/sensors/sensor_manager_android_unittest.cc
@@ -44,7 +44,6 @@ class FakeSensorManagerAndroid : public SensorManagerAndroid {
class AndroidSensorManagerTest : public testing::Test {
protected:
AndroidSensorManagerTest() {
- light_buffer_.reset(new DeviceLightHardwareBuffer);
motion_buffer_.reset(new DeviceMotionHardwareBuffer);
orientation_buffer_.reset(new DeviceOrientationHardwareBuffer);
orientation_absolute_buffer_.reset(new DeviceOrientationHardwareBuffer);
@@ -64,7 +63,6 @@ class AndroidSensorManagerTest : public testing::Test {
ASSERT_TRUE(buffer->data.has_gamma);
}
- std::unique_ptr<DeviceLightHardwareBuffer> light_buffer_;
std::unique_ptr<DeviceMotionHardwareBuffer> motion_buffer_;
std::unique_ptr<DeviceOrientationHardwareBuffer> orientation_buffer_;
std::unique_ptr<DeviceOrientationHardwareBuffer> orientation_absolute_buffer_;
@@ -175,20 +173,6 @@ TEST_F(AndroidSensorManagerTest, DeviceOrientationAbsoluteSensorsActive) {
ASSERT_FALSE(orientation_buffer_->data.all_available_sensors_are_active);
}
-// DeviceLight
-TEST_F(AndroidSensorManagerTest, DeviceLightSensorsActive) {
- FakeSensorManagerAndroid::Register(base::android::AttachCurrentThread());
- FakeSensorManagerAndroid sensorManager;
-
- sensorManager.StartFetchingDeviceLightData(light_buffer_.get());
-
- sensorManager.GotLight(nullptr, nullptr, 100);
- ASSERT_EQ(100, light_buffer_->data.value);
-
- sensorManager.StopFetchingDeviceLightData();
- ASSERT_EQ(-1, light_buffer_->data.value);
-}
-
} // namespace
} // namespace device
« no previous file with comments | « device/sensors/sensor_manager_android.cc ('k') | services/device/device_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698