Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Side by Side Diff: device/bluetooth/test/bluetooth_test.h

Issue 2798193002: Use test UUIDs for device bluetooth unit tests (Closed)
Patch Set: address comments Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « device/bluetooth/bluetooth_remote_gatt_service_unittest.cc ('k') | device/bluetooth/test/bluetooth_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698