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

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

Issue 1926623002: bluetooth: Remove the device info and device class fields from BluetoothDevice. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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>
11 #include <string> 11 #include <string>
12 12
13 #include "base/memory/scoped_vector.h" 13 #include "base/memory/scoped_vector.h"
14 #include "base/strings/string16.h" 14 #include "base/strings/string16.h"
15 #include "device/bluetooth/bluetooth_device.h" 15 #include "device/bluetooth/bluetooth_device.h"
16 #include "device/bluetooth/bluetooth_uuid.h" 16 #include "device/bluetooth/bluetooth_uuid.h"
17 #include "device/bluetooth/test/mock_bluetooth_gatt_service.h" 17 #include "device/bluetooth/test/mock_bluetooth_gatt_service.h"
18 #include "testing/gmock/include/gmock/gmock.h" 18 #include "testing/gmock/include/gmock/gmock.h"
19 19
20 namespace device { 20 namespace device {
21 21
22 class BluetoothRemoteGattService; 22 class BluetoothRemoteGattService;
23 class MockBluetoothAdapter; 23 class MockBluetoothAdapter;
24 24
25 class MockBluetoothDevice : public BluetoothDevice { 25 class MockBluetoothDevice : public BluetoothDevice {
26 public: 26 public:
27 MockBluetoothDevice(MockBluetoothAdapter* adapter, 27 MockBluetoothDevice(MockBluetoothAdapter* adapter,
28 uint32_t bluetooth_class,
ortuno 2016/04/27 20:16:41 I don't think you should remove these from these m
29 const std::string& name, 28 const std::string& name,
30 const std::string& address, 29 const std::string& address,
31 bool paired, 30 bool paired,
32 bool connected); 31 bool connected);
33 virtual ~MockBluetoothDevice(); 32 virtual ~MockBluetoothDevice();
34 33
35 MOCK_CONST_METHOD0(GetBluetoothClass, uint32_t());
36 MOCK_CONST_METHOD0(GetDeviceName, std::string()); 34 MOCK_CONST_METHOD0(GetDeviceName, std::string());
37 MOCK_CONST_METHOD0(GetIdentifier, std::string()); 35 MOCK_CONST_METHOD0(GetIdentifier, std::string());
38 MOCK_CONST_METHOD0(GetAddress, std::string()); 36 MOCK_CONST_METHOD0(GetAddress, std::string());
39 MOCK_CONST_METHOD0(GetVendorIDSource, BluetoothDevice::VendorIDSource());
40 MOCK_CONST_METHOD0(GetVendorID, uint16_t());
41 MOCK_CONST_METHOD0(GetProductID, uint16_t());
42 MOCK_CONST_METHOD0(GetDeviceID, uint16_t());
43 MOCK_CONST_METHOD0(GetName, base::string16()); 37 MOCK_CONST_METHOD0(GetName, base::string16());
44 MOCK_CONST_METHOD0(GetDeviceType, BluetoothDevice::DeviceType()); 38 MOCK_CONST_METHOD0(GetDeviceType, BluetoothDevice::DeviceType());
45 MOCK_CONST_METHOD0(GetAppearance, uint16_t()); 39 MOCK_CONST_METHOD0(GetAppearance, uint16_t());
46 MOCK_CONST_METHOD0(IsPaired, bool()); 40 MOCK_CONST_METHOD0(IsPaired, bool());
47 MOCK_CONST_METHOD0(IsConnected, bool()); 41 MOCK_CONST_METHOD0(IsConnected, bool());
48 MOCK_CONST_METHOD0(IsGattConnected, bool()); 42 MOCK_CONST_METHOD0(IsGattConnected, bool());
49 MOCK_CONST_METHOD0(IsConnectable, bool()); 43 MOCK_CONST_METHOD0(IsConnectable, bool());
50 MOCK_CONST_METHOD0(IsConnecting, bool()); 44 MOCK_CONST_METHOD0(IsConnecting, bool());
51 MOCK_CONST_METHOD0(GetUUIDs, UUIDList()); 45 MOCK_CONST_METHOD0(GetUUIDs, UUIDList());
52 MOCK_CONST_METHOD0(GetInquiryRSSI, int16_t()); 46 MOCK_CONST_METHOD0(GetInquiryRSSI, int16_t());
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 std::string name_; 110 std::string name_;
117 std::string address_; 111 std::string address_;
118 BluetoothDevice::UUIDList uuids_; 112 BluetoothDevice::UUIDList uuids_;
119 113
120 ScopedVector<MockBluetoothGattService> mock_services_; 114 ScopedVector<MockBluetoothGattService> mock_services_;
121 }; 115 };
122 116
123 } // namespace device 117 } // namespace device
124 118
125 #endif // DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_DEVICE_H_ 119 #endif // DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_DEVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698