OLD | NEW |
---|---|
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 #include "base/utf_string_conversions.h" | 5 #include "base/utf_string_conversions.h" |
6 #include "chrome/browser/chromeos/bluetooth/test/mock_bluetooth_adapter.h" | 6 #include "chrome/browser/chromeos/bluetooth/test/mock_bluetooth_adapter.h" |
7 #include "chrome/browser/chromeos/bluetooth/test/mock_bluetooth_device.h" | 7 #include "chrome/browser/chromeos/bluetooth/test/mock_bluetooth_device.h" |
8 | 8 |
9 namespace chromeos { | 9 namespace chromeos { |
10 | 10 |
11 MockBluetoothDevice::MockBluetoothDevice(MockBluetoothAdapter* adapter, | 11 MockBluetoothDevice::MockBluetoothDevice( |
bryeung
2012/09/13 19:52:57
why did this get whitespace changes?
youngki
2012/09/17 21:53:02
Done.
| |
12 const std::string& name, | 12 MockBluetoothAdapter* adapter, |
13 const std::string& address, | 13 const std::string& name, |
14 bool paired, | 14 const std::string& address, |
15 bool bonded, | 15 bool paired, |
16 bool connected) | 16 bool bonded, |
17 : BluetoothDevice(adapter), | 17 bool connected) { |
18 name_(UTF8ToUTF16(name)), | |
19 address_(address) { | |
20 ON_CALL(*this, GetName()) | 18 ON_CALL(*this, GetName()) |
21 .WillByDefault(testing::Return(name_)); | 19 .WillByDefault(testing::Return(UTF8ToUTF16(name))); |
22 ON_CALL(*this, address()) | 20 ON_CALL(*this, address()) |
23 .WillByDefault(testing::ReturnRef(address_)); | 21 .WillByDefault(testing::ReturnRef(address)); |
24 ON_CALL(*this, IsPaired()) | 22 ON_CALL(*this, IsPaired()) |
25 .WillByDefault(testing::Return(paired)); | 23 .WillByDefault(testing::Return(paired)); |
26 ON_CALL(*this, IsBonded()) | 24 ON_CALL(*this, IsBonded()) |
27 .WillByDefault(testing::Return(bonded)); | 25 .WillByDefault(testing::Return(bonded)); |
28 ON_CALL(*this, IsConnected()) | 26 ON_CALL(*this, IsConnected()) |
29 .WillByDefault(testing::Return(connected)); | 27 .WillByDefault(testing::Return(connected)); |
30 } | 28 } |
31 | 29 |
32 MockBluetoothDevice::~MockBluetoothDevice() {} | 30 MockBluetoothDevice::~MockBluetoothDevice() {} |
33 | 31 |
34 } // namespace chromeos | 32 } // namespace chromeos |
OLD | NEW |