summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chromeos/bluetooth/test/mock_bluetooth_device.h
diff options
context:
space:
mode:
authoryoungki@chromium.org <youngki@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-02 01:56:45 +0000
committeryoungki@chromium.org <youngki@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-02 01:56:45 +0000
commitcc1bc719c2fd37e710a5cdf55f4559801b98d9ba (patch)
tree49fd64a8674e54904d886546acfce2f7b636d980 /chrome/browser/chromeos/bluetooth/test/mock_bluetooth_device.h
parentac22933cf0a514c841856e6274df8f2000ae8203 (diff)
downloadchromium_src-cc1bc719c2fd37e710a5cdf55f4559801b98d9ba.zip
chromium_src-cc1bc719c2fd37e710a5cdf55f4559801b98d9ba.tar.gz
chromium_src-cc1bc719c2fd37e710a5cdf55f4559801b98d9ba.tar.bz2
Renames the classes in chrome/browser/chromeos/bluetooth/ ChromeOs-specific (i.e. BluetoothAdapter => BluetoothAdapterChromeOs) and creating interfaces: BluetoothAdapter and BluetoothDevice.
This CL does the Step 1 & 2 of: 1) Renames the classes in chrome/browser/chromeos/bluetooth/ chromeos-specific (i.e. BluetoothAdapter => BluetoothAdapterChromeOs) 2) Create interfaces of the classes in chrome/browser/chromeos/bluetooth/. These interfaces will be used in the platform-independent logics. 3) Move everything out of chrome/browser/chromeos/bluetooth/ into devices/bluetooth/ since the code is no longer specific to linux/chromeos. 4) Add Windows implementations. (i.e. Create BluetoothAdapterWindows) BUG=135470 Review URL: https://chromiumcodereview.appspot.com/10899037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@159615 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chromeos/bluetooth/test/mock_bluetooth_device.h')
-rw-r--r--chrome/browser/chromeos/bluetooth/test/mock_bluetooth_device.h32
1 files changed, 29 insertions, 3 deletions
diff --git a/chrome/browser/chromeos/bluetooth/test/mock_bluetooth_device.h b/chrome/browser/chromeos/bluetooth/test/mock_bluetooth_device.h
index 7079f28..650928c 100644
--- a/chrome/browser/chromeos/bluetooth/test/mock_bluetooth_device.h
+++ b/chrome/browser/chromeos/bluetooth/test/mock_bluetooth_device.h
@@ -9,6 +9,7 @@
#include "base/string16.h"
#include "chrome/browser/chromeos/bluetooth/bluetooth_device.h"
+#include "chromeos/dbus/bluetooth_out_of_band_pairing_data.h"
#include "testing/gmock/include/gmock/gmock.h"
namespace chromeos {
@@ -25,14 +26,38 @@ class MockBluetoothDevice : public BluetoothDevice {
MOCK_CONST_METHOD0(address, const std::string&());
MOCK_CONST_METHOD0(GetName, string16());
+ MOCK_CONST_METHOD0(GetDeviceType, BluetoothDevice::DeviceType());
MOCK_CONST_METHOD0(IsPaired, bool());
MOCK_CONST_METHOD0(IsBonded, bool());
MOCK_CONST_METHOD0(IsConnected, bool());
+ MOCK_CONST_METHOD0(GetServices, const ServiceList&());
+ MOCK_METHOD2(GetServiceRecords,
+ void(const BluetoothDevice::ServiceRecordsCallback&,
+ const BluetoothDevice::ErrorCallback&));
MOCK_CONST_METHOD1(ProvidesServiceWithUUID, bool(const std::string&));
-
MOCK_METHOD2(ProvidesServiceWithName,
- void(const std::string&,
- const ProvidesServiceCallback& callback));
+ void(const std::string&,
+ const BluetoothDevice::ProvidesServiceCallback&));
+ MOCK_CONST_METHOD0(ExpectingPinCode, bool());
+ MOCK_CONST_METHOD0(ExpectingPasskey, bool());
+ MOCK_CONST_METHOD0(ExpectingConfirmation, bool());
+ MOCK_METHOD3(Connect,
+ void(BluetoothDevice::PairingDelegate* pairnig_delegate,
+ const base::Closure& callback,
+ const BluetoothDevice::ErrorCallback& error_callback));
+ MOCK_METHOD1(SetPinCode, void(const std::string&));
+ MOCK_METHOD1(SetPasskey, void(uint32));
+ MOCK_METHOD0(ConfirmPairing, void());
+ MOCK_METHOD0(RejectPairing, void());
+ MOCK_METHOD0(CancelPairing, void());
+ MOCK_METHOD2(Disconnect,
+ void(const base::Closure& callback,
+ const BluetoothDevice::ErrorCallback& error_callback));
+ MOCK_METHOD1(Forget, void(const BluetoothDevice::ErrorCallback&));
+ MOCK_METHOD2(ConnectToService,
+ void(const std::string&,
+ const BluetoothDevice::SocketCallback&));
+
MOCK_METHOD3(SetOutOfBandPairingData,
void(const chromeos::BluetoothOutOfBandPairingData& data,
const base::Closure& callback,
@@ -44,6 +69,7 @@ class MockBluetoothDevice : public BluetoothDevice {
private:
string16 name_;
std::string address_;
+ BluetoothDevice::ServiceList service_list_;
};
} // namespace chromeos