| OLD | NEW |
| 1 // Copyright (c) 2017 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2017 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/run_loop.h" | 5 #include "base/run_loop.h" |
| 6 #include "device/vibration/vibration_manager.mojom.h" | |
| 7 #include "services/device/device_service_test_base.h" | 6 #include "services/device/device_service_test_base.h" |
| 8 #include "services/device/public/interfaces/constants.mojom.h" | 7 #include "services/device/public/interfaces/constants.mojom.h" |
| 8 #include "services/device/public/interfaces/vibration_manager.mojom.h" |
| 9 | 9 |
| 10 #if defined(OS_ANDROID) | 10 #if defined(OS_ANDROID) |
| 11 #include "base/android/jni_android.h" | 11 #include "base/android/jni_android.h" |
| 12 #include "jni/VibrationManagerImpl_jni.h" | 12 #include "jni/VibrationManagerImpl_jni.h" |
| 13 #else | 13 #else |
| 14 #include "device/vibration/vibration_manager_impl.h" | 14 #include "services/device/vibration/vibration_manager_impl.h" |
| 15 #endif | 15 #endif |
| 16 | 16 |
| 17 namespace device { | 17 namespace device { |
| 18 | 18 |
| 19 namespace { | 19 namespace { |
| 20 | 20 |
| 21 class VibrationManagerImplTest : public DeviceServiceTestBase { | 21 class VibrationManagerImplTest : public DeviceServiceTestBase { |
| 22 public: | 22 public: |
| 23 VibrationManagerImplTest() = default; | 23 VibrationManagerImplTest() = default; |
| 24 ~VibrationManagerImplTest() override = default; | 24 ~VibrationManagerImplTest() override = default; |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 EXPECT_EQ(10000, GetVibrationMilliSeconds()); | 72 EXPECT_EQ(10000, GetVibrationMilliSeconds()); |
| 73 | 73 |
| 74 EXPECT_FALSE(GetVibrationCancelled()); | 74 EXPECT_FALSE(GetVibrationCancelled()); |
| 75 Cancel(); | 75 Cancel(); |
| 76 EXPECT_TRUE(GetVibrationCancelled()); | 76 EXPECT_TRUE(GetVibrationCancelled()); |
| 77 } | 77 } |
| 78 | 78 |
| 79 } // namespace | 79 } // namespace |
| 80 | 80 |
| 81 } // namespace device | 81 } // namespace device |
| OLD | NEW |