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

Side by Side Diff: chrome/browser/chromeos/bluetooth/test/mock_bluetooth_device.h

Issue 11075006: Moved bluetooth adapter files to device/bluetooth/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: renamed 'bluetooth' target to 'device_bluetooth'. Created 8 years, 2 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 | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_CHROMEOS_BLUETOOTH_TEST_MOCK_BLUETOOTH_DEVICE_H_
6 #define CHROME_BROWSER_CHROMEOS_BLUETOOTH_TEST_MOCK_BLUETOOTH_DEVICE_H_
7
8 #include <string>
9
10 #include "base/string16.h"
11 #include "chrome/browser/chromeos/bluetooth/bluetooth_device.h"
12 #include "chromeos/dbus/bluetooth_out_of_band_pairing_data.h"
13 #include "testing/gmock/include/gmock/gmock.h"
14
15 namespace chromeos {
16
17 class MockBluetoothDevice : public BluetoothDevice {
18 public:
19 MockBluetoothDevice(MockBluetoothAdapter* adapter,
20 const std::string& name,
21 const std::string& address,
22 bool paired,
23 bool bonded,
24 bool connected);
25 virtual ~MockBluetoothDevice();
26
27 MOCK_CONST_METHOD0(address, const std::string&());
28 MOCK_CONST_METHOD0(GetName, string16());
29 MOCK_CONST_METHOD0(GetDeviceType, BluetoothDevice::DeviceType());
30 MOCK_CONST_METHOD0(IsPaired, bool());
31 MOCK_CONST_METHOD0(IsBonded, bool());
32 MOCK_CONST_METHOD0(IsConnected, bool());
33 MOCK_CONST_METHOD0(GetServices, const ServiceList&());
34 MOCK_METHOD2(GetServiceRecords,
35 void(const BluetoothDevice::ServiceRecordsCallback&,
36 const BluetoothDevice::ErrorCallback&));
37 MOCK_CONST_METHOD1(ProvidesServiceWithUUID, bool(const std::string&));
38 MOCK_METHOD2(ProvidesServiceWithName,
39 void(const std::string&,
40 const BluetoothDevice::ProvidesServiceCallback&));
41 MOCK_CONST_METHOD0(ExpectingPinCode, bool());
42 MOCK_CONST_METHOD0(ExpectingPasskey, bool());
43 MOCK_CONST_METHOD0(ExpectingConfirmation, bool());
44 MOCK_METHOD3(Connect,
45 void(BluetoothDevice::PairingDelegate* pairnig_delegate,
46 const base::Closure& callback,
47 const BluetoothDevice::ErrorCallback& error_callback));
48 MOCK_METHOD1(SetPinCode, void(const std::string&));
49 MOCK_METHOD1(SetPasskey, void(uint32));
50 MOCK_METHOD0(ConfirmPairing, void());
51 MOCK_METHOD0(RejectPairing, void());
52 MOCK_METHOD0(CancelPairing, void());
53 MOCK_METHOD2(Disconnect,
54 void(const base::Closure& callback,
55 const BluetoothDevice::ErrorCallback& error_callback));
56 MOCK_METHOD1(Forget, void(const BluetoothDevice::ErrorCallback&));
57 MOCK_METHOD2(ConnectToService,
58 void(const std::string&,
59 const BluetoothDevice::SocketCallback&));
60
61 MOCK_METHOD3(SetOutOfBandPairingData,
62 void(const chromeos::BluetoothOutOfBandPairingData& data,
63 const base::Closure& callback,
64 const BluetoothDevice::ErrorCallback& error_callback));
65 MOCK_METHOD2(ClearOutOfBandPairingData,
66 void(const base::Closure& callback,
67 const BluetoothDevice::ErrorCallback& error_callback));
68
69 private:
70 string16 name_;
71 std::string address_;
72 BluetoothDevice::ServiceList service_list_;
73 };
74
75 } // namespace chromeos
76
77 #endif // CHROME_BROWSER_CHROMEOS_BLUETOOTH_TEST_MOCK_BLUETOOTH_DEVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698