Roll breakpad a513e85:7caf028 (svn 1384:1385)
[chromium-blink-merge.git] / device / bluetooth / test / mock_bluetooth_gatt_characteristic.cc
blob9cacfbea138d2dc2652eaae1966b8793c7063b90
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
3 // found in the LICENSE file.
5 #include "device/bluetooth/test/mock_bluetooth_gatt_characteristic.h"
7 #include "device/bluetooth/test/mock_bluetooth_gatt_service.h"
9 using testing::Return;
10 using testing::ReturnRefOfCopy;
11 using testing::_;
13 namespace device {
15 MockBluetoothGattCharacteristic::MockBluetoothGattCharacteristic(
16 MockBluetoothGattService* service,
17 const std::string& identifier,
18 const BluetoothUUID& uuid,
19 bool is_local,
20 Properties properties,
21 Permissions permissions) {
22 ON_CALL(*this, GetIdentifier()).WillByDefault(Return(identifier));
23 ON_CALL(*this, GetUUID()).WillByDefault(Return(uuid));
24 ON_CALL(*this, IsLocal()).WillByDefault(Return(is_local));
25 ON_CALL(*this, GetValue())
26 .WillByDefault(ReturnRefOfCopy(std::vector<uint8>()));
27 ON_CALL(*this, GetService()).WillByDefault(Return(service));
28 ON_CALL(*this, GetProperties()).WillByDefault(Return(properties));
29 ON_CALL(*this, GetPermissions()).WillByDefault(Return(permissions));
30 ON_CALL(*this, IsNotifying()).WillByDefault(Return(false));
31 ON_CALL(*this, GetDescriptors())
32 .WillByDefault(Return(std::vector<BluetoothGattDescriptor*>()));
35 MockBluetoothGattCharacteristic::~MockBluetoothGattCharacteristic() {
38 } // namespace device