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_H_ | 5 #ifndef DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_H_ |
6 #define DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_H_ | 6 #define DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 BluetoothTestBase(); | 51 BluetoothTestBase(); |
52 ~BluetoothTestBase() override; | 52 ~BluetoothTestBase() override; |
53 | 53 |
54 // Checks that no unexpected calls have been made to callbacks. | 54 // Checks that no unexpected calls have been made to callbacks. |
55 // Overrides of this method should always call the parent's class method. | 55 // Overrides of this method should always call the parent's class method. |
56 void TearDown() override; | 56 void TearDown() override; |
57 | 57 |
58 // Calls adapter_->StartDiscoverySessionWithFilter with Low Energy transport, | 58 // Calls adapter_->StartDiscoverySessionWithFilter with Low Energy transport, |
59 // and this fixture's callbacks expecting success. | 59 // and this fixture's callbacks expecting success. |
60 // Then RunLoop().RunUntilIdle(). | 60 // Then RunLoop().RunUntilIdle(). |
61 void StartLowEnergyDiscoverySession(); | 61 virtual void StartLowEnergyDiscoverySession(); |
62 | 62 |
63 // Calls adapter_->StartDiscoverySessionWithFilter with Low Energy transport, | 63 // Calls adapter_->StartDiscoverySessionWithFilter with Low Energy transport, |
64 // and this fixture's callbacks expecting error. | 64 // and this fixture's callbacks expecting error. |
65 // Then RunLoop().RunUntilIdle(). | 65 // Then RunLoop().RunUntilIdle(). |
66 void StartLowEnergyDiscoverySessionExpectedToFail(); | 66 void StartLowEnergyDiscoverySessionExpectedToFail(); |
67 | 67 |
68 // Check if Low Energy is available. On Mac, we require OS X >= 10.10. | 68 // Check if Low Energy is available. On Mac, we require OS X >= 10.10. |
69 virtual bool PlatformSupportsLowEnergy() = 0; | 69 virtual bool PlatformSupportsLowEnergy() = 0; |
70 | 70 |
71 // Initializes the BluetoothAdapter |adapter_| with the system adapter. | 71 // Initializes the BluetoothAdapter |adapter_| with the system adapter. |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 int actual_error_callback_calls_ = 0; | 252 int actual_error_callback_calls_ = 0; |
253 bool unexpected_success_callback_ = false; | 253 bool unexpected_success_callback_ = false; |
254 bool unexpected_error_callback_ = false; | 254 bool unexpected_error_callback_ = false; |
255 | 255 |
256 base::WeakPtrFactory<BluetoothTestBase> weak_factory_; | 256 base::WeakPtrFactory<BluetoothTestBase> weak_factory_; |
257 }; | 257 }; |
258 | 258 |
259 } // namespace device | 259 } // namespace device |
260 | 260 |
261 #endif // DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_H_ | 261 #endif // DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_H_ |
OLD | NEW |