OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_MAC_H_ | 5 #ifndef DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_MAC_H_ |
6 #define DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_MAC_H_ | 6 #define DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_MAC_H_ |
7 | 7 |
8 #include "base/test/test_simple_task_runner.h" | 8 #include "base/test/test_simple_task_runner.h" |
9 #include "device/bluetooth/test/bluetooth_test.h" | 9 #include "device/bluetooth/test/bluetooth_test.h" |
10 | 10 |
11 namespace device { | 11 namespace device { |
12 | 12 |
13 class BluetoothAdapterMac; | 13 class BluetoothAdapterMac; |
14 | 14 |
15 // Mac implementation of BluetoothTestBase. | 15 // Mac implementation of BluetoothTestBase. |
16 class BluetoothTestMac : public BluetoothTestBase { | 16 class BluetoothTestMac : public BluetoothTestBase { |
17 public: | 17 public: |
| 18 static const std::string kTestPeripheralUUID1; |
| 19 static const std::string kTestPeripheralUUID2; |
| 20 |
18 BluetoothTestMac(); | 21 BluetoothTestMac(); |
19 ~BluetoothTestMac() override; | 22 ~BluetoothTestMac() override; |
20 | 23 |
21 // Test overrides: | 24 // Test overrides: |
22 void SetUp() override; | 25 void SetUp() override; |
23 | 26 |
24 // BluetoothTestBase overrides: | 27 // BluetoothTestBase overrides: |
| 28 bool PlatformSupportsLowEnergy() override; |
25 void InitWithDefaultAdapter() override; | 29 void InitWithDefaultAdapter() override; |
26 void InitWithoutDefaultAdapter() override; | 30 void InitWithoutDefaultAdapter() override; |
27 void InitWithFakeAdapter() override; | 31 void InitWithFakeAdapter() override; |
| 32 void DiscoverLowEnergyDevice(int device_ordinal) override; |
28 | 33 |
29 protected: | 34 protected: |
| 35 // Utility function for finding CBUUIDs with relatively nice SHA256 hashes. |
| 36 std::string FindCBUUIDForHashTarget(); |
| 37 |
30 BluetoothAdapterMac* adapter_mac_ = NULL; | 38 BluetoothAdapterMac* adapter_mac_ = NULL; |
31 }; | 39 }; |
32 | 40 |
33 // Defines common test fixture name. Use TEST_F(BluetoothTest, YourTestName). | 41 // Defines common test fixture name. Use TEST_F(BluetoothTest, YourTestName). |
34 typedef BluetoothTestMac BluetoothTest; | 42 typedef BluetoothTestMac BluetoothTest; |
35 | 43 |
36 } // namespace device | 44 } // namespace device |
37 | 45 |
38 #endif // DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_MAC_H_ | 46 #endif // DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_MAC_H_ |
OLD | NEW |