OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/bind.h" | 5 #include "base/bind.h" |
6 #include "base/message_loop/message_loop.h" | 6 #include "base/message_loop/message_loop.h" |
7 #include "base/run_loop.h" | 7 #include "base/run_loop.h" |
8 | 8 |
9 #include "device/generic_sensor/fake_platform_sensor.h" | 9 #include "services/device/generic_sensor/fake_platform_sensor.h" |
10 #include "device/generic_sensor/fake_platform_sensor_provider.h" | 10 #include "services/device/generic_sensor/fake_platform_sensor_provider.h" |
11 #include "device/generic_sensor/public/interfaces/sensor_provider.mojom.h" | 11 #include "services/device/public/interfaces/sensor_provider.mojom.h" |
12 | 12 |
13 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
14 | 14 |
15 namespace device { | 15 namespace device { |
16 | 16 |
17 using mojom::SensorInitParams; | 17 using mojom::SensorInitParams; |
18 using mojom::SensorType; | 18 using mojom::SensorType; |
19 | 19 |
20 class TestSensorCreateCallback { | 20 class TestSensorCreateCallback { |
21 public: | 21 public: |
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
401 sensor_client_->set_notification_suspended(false); | 401 sensor_client_->set_notification_suspended(false); |
402 EXPECT_FALSE(sensor_client_->IsNotificationSuspended()); | 402 EXPECT_FALSE(sensor_client_->IsNotificationSuspended()); |
403 for (const auto& client : clients) | 403 for (const auto& client : clients) |
404 EXPECT_FALSE(client->IsNotificationSuspended()); | 404 EXPECT_FALSE(client->IsNotificationSuspended()); |
405 | 405 |
406 fake_sensor->UpdateSensor(); | 406 fake_sensor->UpdateSensor(); |
407 EXPECT_TRUE(fake_sensor->started()); | 407 EXPECT_TRUE(fake_sensor->started()); |
408 } | 408 } |
409 | 409 |
410 } // namespace device | 410 } // namespace device |
OLD | NEW |