| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "device/bluetooth/test/mock_bluetooth_gatt_descriptor.h" | 5 #include "device/bluetooth/test/mock_bluetooth_gatt_descriptor.h" |
| 6 | 6 |
| 7 #include "device/bluetooth/test/mock_bluetooth_gatt_characteristic.h" | 7 #include "device/bluetooth/test/mock_bluetooth_gatt_characteristic.h" |
| 8 | 8 |
| 9 using testing::Return; | 9 using testing::Return; |
| 10 using testing::ReturnRefOfCopy; | 10 using testing::ReturnRefOfCopy; |
| 11 | 11 |
| 12 namespace device { | 12 namespace device { |
| 13 | 13 |
| 14 MockBluetoothGattDescriptor::MockBluetoothGattDescriptor( | 14 MockBluetoothGattDescriptor::MockBluetoothGattDescriptor( |
| 15 MockBluetoothGattCharacteristic* characteristic, | 15 MockBluetoothGattCharacteristic* characteristic, |
| 16 const std::string& identifier, | 16 const std::string& identifier, |
| 17 const BluetoothUUID& uuid, | 17 const BluetoothUUID& uuid, |
| 18 bool is_local, | 18 bool is_local, |
| 19 BluetoothGattCharacteristic::Permissions permissions) { | 19 BluetoothRemoteGattCharacteristic::Permissions permissions) { |
| 20 ON_CALL(*this, GetIdentifier()).WillByDefault(Return(identifier)); | 20 ON_CALL(*this, GetIdentifier()).WillByDefault(Return(identifier)); |
| 21 ON_CALL(*this, GetUUID()).WillByDefault(Return(uuid)); | 21 ON_CALL(*this, GetUUID()).WillByDefault(Return(uuid)); |
| 22 ON_CALL(*this, IsLocal()).WillByDefault(Return(is_local)); | 22 ON_CALL(*this, IsLocal()).WillByDefault(Return(is_local)); |
| 23 ON_CALL(*this, GetValue()) | 23 ON_CALL(*this, GetValue()) |
| 24 .WillByDefault(ReturnRefOfCopy(std::vector<uint8_t>())); | 24 .WillByDefault(ReturnRefOfCopy(std::vector<uint8_t>())); |
| 25 ON_CALL(*this, GetCharacteristic()).WillByDefault(Return(characteristic)); | 25 ON_CALL(*this, GetCharacteristic()).WillByDefault(Return(characteristic)); |
| 26 ON_CALL(*this, GetPermissions()).WillByDefault(Return(permissions)); | 26 ON_CALL(*this, GetPermissions()).WillByDefault(Return(permissions)); |
| 27 } | 27 } |
| 28 | 28 |
| 29 MockBluetoothGattDescriptor::~MockBluetoothGattDescriptor() { | 29 MockBluetoothGattDescriptor::~MockBluetoothGattDescriptor() { |
| 30 } | 30 } |
| 31 | 31 |
| 32 } // namespace device | 32 } // namespace device |
| OLD | NEW |