| 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 <memory> | 10 #include <memory> |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 MEDIUM = -21, | 80 MEDIUM = -21, |
| 81 HIGH = -1, | 81 HIGH = -1, |
| 82 }; | 82 }; |
| 83 | 83 |
| 84 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.device.bluetooth.test | 84 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.device.bluetooth.test |
| 85 enum class TestTxPower { | 85 enum class TestTxPower { |
| 86 LOWEST = -40, | 86 LOWEST = -40, |
| 87 LOWER = -20, | 87 LOWER = -20, |
| 88 }; | 88 }; |
| 89 | 89 |
| 90 // Services |
| 90 static const std::string kTestUUIDGenericAccess; | 91 static const std::string kTestUUIDGenericAccess; |
| 91 static const std::string kTestUUIDGenericAttribute; | 92 static const std::string kTestUUIDGenericAttribute; |
| 92 static const std::string kTestUUIDImmediateAlert; | 93 static const std::string kTestUUIDImmediateAlert; |
| 93 static const std::string kTestUUIDLinkLoss; | 94 static const std::string kTestUUIDLinkLoss; |
| 94 static const std::string kTestUUIDHeartRate; | 95 static const std::string kTestUUIDHeartRate; |
| 96 // Characteristics |
| 97 // The following three characteristics are for kTestUUIDGenericAccess. |
| 98 static const std::string kTestUUIDDeviceName; |
| 99 static const std::string kTestUUIDAppearance; |
| 100 static const std::string kTestUUIDReconnectionAddress; |
| 101 // This characteristic is for kTestUUIDHeartRate. |
| 102 static const std::string kTestUUIDHeartRateMeasurement; |
| 103 // Descriptors |
| 104 static const std::string kTestUUIDCharacteristicUserDescription; |
| 105 static const std::string kTestUUIDClientCharacteristicConfiguration; |
| 106 static const std::string kTestUUIDServerCharacteristicConfiguration; |
| 107 static const std::string kTestUUIDCharacteristicPresentationFormat; |
| 95 | 108 |
| 96 BluetoothTestBase(); | 109 BluetoothTestBase(); |
| 97 ~BluetoothTestBase() override; | 110 ~BluetoothTestBase() override; |
| 98 | 111 |
| 99 // Checks that no unexpected calls have been made to callbacks. | 112 // Checks that no unexpected calls have been made to callbacks. |
| 100 // Overrides of this method should always call the parent's class method. | 113 // Overrides of this method should always call the parent's class method. |
| 101 void TearDown() override; | 114 void TearDown() override; |
| 102 | 115 |
| 103 // Calls adapter_->StartDiscoverySessionWithFilter with Low Energy transport, | 116 // Calls adapter_->StartDiscoverySessionWithFilter with Low Energy transport, |
| 104 // and this fixture's callbacks expecting success. | 117 // and this fixture's callbacks expecting success. |
| (...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 525 int actual_error_callback_calls_ = 0; | 538 int actual_error_callback_calls_ = 0; |
| 526 bool unexpected_success_callback_ = false; | 539 bool unexpected_success_callback_ = false; |
| 527 bool unexpected_error_callback_ = false; | 540 bool unexpected_error_callback_ = false; |
| 528 | 541 |
| 529 base::WeakPtrFactory<BluetoothTestBase> weak_factory_; | 542 base::WeakPtrFactory<BluetoothTestBase> weak_factory_; |
| 530 }; | 543 }; |
| 531 | 544 |
| 532 } // namespace device | 545 } // namespace device |
| 533 | 546 |
| 534 #endif // DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_H_ | 547 #endif // DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_H_ |
| OLD | NEW |