| Index: device/generic_sensor/platform_sensor_and_provider_unittest_win.cc
|
| diff --git a/device/generic_sensor/platform_sensor_and_provider_unittest_win.cc b/device/generic_sensor/platform_sensor_and_provider_unittest_win.cc
|
| index f0f44bd71c442f3767c5adfb4b824638f4af2bf5..a87696d470e6f119e12f021978cd2353dd358562 100644
|
| --- a/device/generic_sensor/platform_sensor_and_provider_unittest_win.cc
|
| +++ b/device/generic_sensor/platform_sensor_and_provider_unittest_win.cc
|
| @@ -486,4 +486,22 @@ TEST_F(PlatformSensorAndProviderTestWin, SensorStateChangedToReady) {
|
| base::RunLoop().RunUntilIdle();
|
| }
|
|
|
| +// Tests that GetMaximumSupportedFrequency provides correct value.
|
| +TEST_F(PlatformSensorAndProviderTestWin, GetMaximumSupportedFrequency) {
|
| + SetSupportedReportingFrequency(20);
|
| + SetSupportedSensor(SENSOR_TYPE_AMBIENT_LIGHT);
|
| + auto sensor = CreateSensor(SensorType::AMBIENT_LIGHT);
|
| + EXPECT_TRUE(sensor);
|
| + EXPECT_THAT(sensor->GetMaximumSupportedFrequency(), 20);
|
| +}
|
| +
|
| +// Tests that GetMaximumSupportedFrequency returns fallback value.
|
| +TEST_F(PlatformSensorAndProviderTestWin, GetMaximumSupportedFrequencyFallback) {
|
| + SetSupportedReportingFrequency(0);
|
| + SetSupportedSensor(SENSOR_TYPE_AMBIENT_LIGHT);
|
| + auto sensor = CreateSensor(SensorType::AMBIENT_LIGHT);
|
| + EXPECT_TRUE(sensor);
|
| + EXPECT_THAT(sensor->GetMaximumSupportedFrequency(), 5);
|
| +}
|
| +
|
| } // namespace device
|
|
|