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

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

Issue 2009753002: bluetooth: Make public BluetoothDevice::GetName method. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: split out name/alias Created 4 years, 5 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_MOCK_BLUETOOTH_DEVICE_H_ 5 #ifndef DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_DEVICE_H_
6 #define DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_DEVICE_H_ 6 #define DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_DEVICE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 24 matching lines...) Expand all
35 35
36 MOCK_CONST_METHOD0(GetBluetoothClass, uint32_t()); 36 MOCK_CONST_METHOD0(GetBluetoothClass, uint32_t());
37 MOCK_CONST_METHOD0(GetType, BluetoothTransport()); 37 MOCK_CONST_METHOD0(GetType, BluetoothTransport());
38 MOCK_CONST_METHOD0(GetIdentifier, std::string()); 38 MOCK_CONST_METHOD0(GetIdentifier, std::string());
39 MOCK_CONST_METHOD0(GetAddress, std::string()); 39 MOCK_CONST_METHOD0(GetAddress, std::string());
40 MOCK_CONST_METHOD0(GetVendorIDSource, BluetoothDevice::VendorIDSource()); 40 MOCK_CONST_METHOD0(GetVendorIDSource, BluetoothDevice::VendorIDSource());
41 MOCK_CONST_METHOD0(GetVendorID, uint16_t()); 41 MOCK_CONST_METHOD0(GetVendorID, uint16_t());
42 MOCK_CONST_METHOD0(GetProductID, uint16_t()); 42 MOCK_CONST_METHOD0(GetProductID, uint16_t());
43 MOCK_CONST_METHOD0(GetDeviceID, uint16_t()); 43 MOCK_CONST_METHOD0(GetDeviceID, uint16_t());
44 MOCK_CONST_METHOD0(GetAppearance, uint16_t()); 44 MOCK_CONST_METHOD0(GetAppearance, uint16_t());
45 MOCK_CONST_METHOD0(GetName, base::Optional<std::string>());
45 MOCK_CONST_METHOD0(GetNameForDisplay, base::string16()); 46 MOCK_CONST_METHOD0(GetNameForDisplay, base::string16());
46 MOCK_CONST_METHOD0(GetDeviceType, BluetoothDevice::DeviceType()); 47 MOCK_CONST_METHOD0(GetDeviceType, BluetoothDevice::DeviceType());
47 MOCK_CONST_METHOD0(IsPaired, bool()); 48 MOCK_CONST_METHOD0(IsPaired, bool());
48 MOCK_CONST_METHOD0(IsConnected, bool()); 49 MOCK_CONST_METHOD0(IsConnected, bool());
49 MOCK_CONST_METHOD0(IsGattConnected, bool()); 50 MOCK_CONST_METHOD0(IsGattConnected, bool());
50 MOCK_CONST_METHOD0(IsConnectable, bool()); 51 MOCK_CONST_METHOD0(IsConnectable, bool());
51 MOCK_CONST_METHOD0(IsConnecting, bool()); 52 MOCK_CONST_METHOD0(IsConnecting, bool());
52 MOCK_CONST_METHOD0(GetUUIDs, UUIDList()); 53 MOCK_CONST_METHOD0(GetUUIDs, UUIDList());
53 MOCK_CONST_METHOD0(GetInquiryRSSI, int16_t()); 54 MOCK_CONST_METHOD0(GetInquiryRSSI, int16_t());
54 MOCK_CONST_METHOD0(GetInquiryTxPower, int16_t()); 55 MOCK_CONST_METHOD0(GetInquiryTxPower, int16_t());
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 void(const GattConnectionCallback& callback, 90 void(const GattConnectionCallback& callback,
90 const ConnectErrorCallback& error_callback)); 91 const ConnectErrorCallback& error_callback));
91 92
92 MOCK_METHOD1(SetGattServicesDiscoveryComplete, void(bool)); 93 MOCK_METHOD1(SetGattServicesDiscoveryComplete, void(bool));
93 MOCK_CONST_METHOD0(IsGattServicesDiscoveryComplete, bool()); 94 MOCK_CONST_METHOD0(IsGattServicesDiscoveryComplete, bool());
94 95
95 MOCK_CONST_METHOD0(GetGattServices, 96 MOCK_CONST_METHOD0(GetGattServices,
96 std::vector<BluetoothRemoteGattService*>()); 97 std::vector<BluetoothRemoteGattService*>());
97 MOCK_CONST_METHOD1(GetGattService, 98 MOCK_CONST_METHOD1(GetGattService,
98 BluetoothRemoteGattService*(const std::string&)); 99 BluetoothRemoteGattService*(const std::string&));
99 MOCK_CONST_METHOD0(GetDeviceName, std::string());
100 MOCK_METHOD0(CreateGattConnectionImpl, void()); 100 MOCK_METHOD0(CreateGattConnectionImpl, void());
101 MOCK_METHOD0(DisconnectGatt, void()); 101 MOCK_METHOD0(DisconnectGatt, void());
102 102
103 // BluetoothDevice manages the lifetime of its BluetoothGATTServices. 103 // BluetoothDevice manages the lifetime of its BluetoothGATTServices.
104 // This method takes ownership of the MockBluetoothGATTServices. This is only 104 // This method takes ownership of the MockBluetoothGATTServices. This is only
105 // for convenience as far as testing is concerned, and it's possible to write 105 // for convenience as far as testing is concerned, and it's possible to write
106 // test cases without using these functions. 106 // test cases without using these functions.
107 // Example: 107 // Example:
108 // ON_CALL(*mock_device, GetGattServices)) 108 // ON_CALL(*mock_device, GetGattServices))
109 // .WillByDefault(Invoke(*mock_device, 109 // .WillByDefault(Invoke(*mock_device,
(...skipping 11 matching lines...) Expand all
121 std::string address_; 121 std::string address_;
122 BluetoothDevice::UUIDList uuids_; 122 BluetoothDevice::UUIDList uuids_;
123 bool connected_; 123 bool connected_;
124 124
125 ScopedVector<MockBluetoothGattService> mock_services_; 125 ScopedVector<MockBluetoothGattService> mock_services_;
126 }; 126 };
127 127
128 } // namespace device 128 } // namespace device
129 129
130 #endif // DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_DEVICE_H_ 130 #endif // DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_DEVICE_H_
OLDNEW
« no previous file with comments | « device/bluetooth/test/mock_bluetooth_cbperipheral_mac.mm ('k') | device/bluetooth/test/mock_bluetooth_device.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698