| 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 #ifndef DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_WIN_H_ | 5 #ifndef DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_WIN_H_ |
| 6 #define DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_WIN_H_ | 6 #define DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_WIN_H_ |
| 7 | 7 |
| 8 #include "device/bluetooth/test/bluetooth_test.h" | 8 #include "device/bluetooth/test/bluetooth_test.h" |
| 9 | 9 |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| 11 #include "base/test/test_pending_task.h" | 11 #include "base/test/test_pending_task.h" |
| 12 #include "base/test/test_simple_task_runner.h" | 12 #include "base/test/test_simple_task_runner.h" |
| 13 #include "device/bluetooth/bluetooth_classic_win_fake.h" |
| 14 #include "device/bluetooth/bluetooth_low_energy_win_fake.h" |
| 13 | 15 |
| 14 namespace device { | 16 namespace device { |
| 15 class BluetoothAdapterWin; | 17 class BluetoothAdapterWin; |
| 16 | 18 |
| 17 // Windows implementation of BluetoothTestBase. | 19 // Windows implementation of BluetoothTestBase. |
| 18 class BluetoothTestWin : public BluetoothTestBase { | 20 class BluetoothTestWin : public BluetoothTestBase { |
| 19 public: | 21 public: |
| 20 BluetoothTestWin(); | 22 BluetoothTestWin(); |
| 21 ~BluetoothTestWin() override; | 23 ~BluetoothTestWin() override; |
| 22 | 24 |
| 23 // BluetoothTestBase overrides | 25 // BluetoothTestBase overrides |
| 24 bool PlatformSupportsLowEnergy() override; | 26 bool PlatformSupportsLowEnergy() override; |
| 25 void InitWithDefaultAdapter() override; | 27 void InitWithDefaultAdapter() override; |
| 26 void InitWithoutDefaultAdapter() override; | 28 void InitWithoutDefaultAdapter() override; |
| 27 void InitWithFakeAdapter() override; | 29 void InitWithFakeAdapter() override; |
| 28 bool DenyPermission() override; | 30 bool DenyPermission() override; |
| 29 | 31 |
| 30 private: | 32 private: |
| 31 scoped_refptr<base::TestSimpleTaskRunner> ui_task_runner_; | 33 scoped_refptr<base::TestSimpleTaskRunner> ui_task_runner_; |
| 32 scoped_refptr<base::TestSimpleTaskRunner> bluetooth_task_runner_; | 34 scoped_refptr<base::TestSimpleTaskRunner> bluetooth_task_runner_; |
| 33 BluetoothAdapterWin* adapter_win_; | 35 BluetoothAdapterWin* adapter_win_; |
| 34 | 36 |
| 37 win::BluetoothClassicWrapperFake* fake_bt_classic_wrapper_; |
| 38 win::BluetoothLowEnergyWrapperFake* fake_bt_le_wrapper_; |
| 39 |
| 35 void AdapterInitCallback(); | 40 void AdapterInitCallback(); |
| 36 }; | 41 }; |
| 37 | 42 |
| 38 // Defines common test fixture name. Use TEST_F(BluetoothTest, YourTestName). | 43 // Defines common test fixture name. Use TEST_F(BluetoothTest, YourTestName). |
| 39 typedef BluetoothTestWin BluetoothTest; | 44 typedef BluetoothTestWin BluetoothTest; |
| 40 | 45 |
| 41 } // namespace device | 46 } // namespace device |
| 42 | 47 |
| 43 #endif // DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_WIN_H_ | 48 #endif // DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_WIN_H_ |
| OLD | NEW |