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 #ifndef CHROME_BROWSER_CHROMEOS_BLUETOOTH_TEST_MOCK_BLUETOOTH_DEVICE_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_BLUETOOTH_TEST_MOCK_BLUETOOTH_DEVICE_H_ |
6 #define CHROME_BROWSER_CHROMEOS_BLUETOOTH_TEST_MOCK_BLUETOOTH_DEVICE_H_ | 6 #define CHROME_BROWSER_CHROMEOS_BLUETOOTH_TEST_MOCK_BLUETOOTH_DEVICE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/string16.h" | 11 #include "base/string16.h" |
12 #include "chrome/browser/chromeos/bluetooth/bluetooth_device.h" | 12 #include "chrome/browser/chromeos/bluetooth/bluetooth_device.h" |
13 #include "testing/gmock/include/gmock/gmock.h" | 13 #include "testing/gmock/include/gmock/gmock.h" |
14 | 14 |
15 namespace chromeos { | 15 namespace chromeos { |
16 | 16 |
17 class MockBluetoothDevice : public BluetoothDevice { | 17 class MockBluetoothDevice : public BluetoothDevice { |
18 public: | 18 public: |
19 explicit MockBluetoothDevice(MockBluetoothAdapter* adapter, | 19 explicit MockBluetoothDevice(MockBluetoothAdapter* adapter, |
20 const std::string& name, const std::string& address); | 20 const std::string& name, const std::string& address); |
21 virtual ~MockBluetoothDevice(); | 21 virtual ~MockBluetoothDevice(); |
22 | 22 |
23 MOCK_CONST_METHOD0(address, const std::string&()); | 23 MOCK_CONST_METHOD0(address, const std::string&()); |
24 MOCK_CONST_METHOD0(GetName, string16()); | 24 MOCK_CONST_METHOD0(GetName, string16()); |
25 MOCK_CONST_METHOD1(ProvidesServiceWithUUID, bool(const std::string&)); | 25 MOCK_CONST_METHOD1(ProvidesServiceWithUUID, bool(const std::string&)); |
26 | 26 |
| 27 MOCK_METHOD3(SetOutOfBandPairingData, |
| 28 void(const chromeos::BluetoothOutOfBandPairingData& data, |
| 29 const base::Closure& callback, |
| 30 const BluetoothDevice::ErrorCallback& error_callback)); |
| 31 MOCK_METHOD2(ClearOutOfBandPairingData, |
| 32 void(const base::Closure& callback, |
| 33 const BluetoothDevice::ErrorCallback& error_callback)); |
| 34 |
27 private: | 35 private: |
28 string16 name_; | 36 string16 name_; |
29 std::string address_; | 37 std::string address_; |
30 }; | 38 }; |
31 | 39 |
32 } // namespace chromeos | 40 } // namespace chromeos |
33 | 41 |
34 #endif // CHROME_BROWSER_CHROMEOS_BLUETOOTH_TEST_MOCK_BLUETOOTH_DEVICE_H_ | 42 #endif // CHROME_BROWSER_CHROMEOS_BLUETOOTH_TEST_MOCK_BLUETOOTH_DEVICE_H_ |
OLD | NEW |