summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chromeos/bluetooth
diff options
context:
space:
mode:
authorbryeung@chromium.org <bryeung@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-14 23:11:10 +0000
committerbryeung@chromium.org <bryeung@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-14 23:11:10 +0000
commit7b092faa9eba709a872f8c37f04cd93cea4964d4 (patch)
treeeb1881b590439a220729878548761fdb7e2f0928 /chrome/browser/chromeos/bluetooth
parent890c2b5e6424995d5118c6cf80e4e2c1d78803c5 (diff)
downloadchromium_src-7b092faa9eba709a872f8c37f04cd93cea4964d4.zip
chromium_src-7b092faa9eba709a872f8c37f04cd93cea4964d4.tar.gz
chromium_src-7b092faa9eba709a872f8c37f04cd93cea4964d4.tar.bz2
Add mocks for SetDiscovering.
This doesn't yet do anything with the list of devices to discover. In a follow-up CL, it will send DeviceAdded notifications for them on demand. TEST=none BUG=none Review URL: https://chromiumcodereview.appspot.com/10539152 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142256 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chromeos/bluetooth')
-rw-r--r--chrome/browser/chromeos/bluetooth/bluetooth_adapter.h6
-rw-r--r--chrome/browser/chromeos/bluetooth/test/mock_bluetooth_adapter.h7
2 files changed, 9 insertions, 4 deletions
diff --git a/chrome/browser/chromeos/bluetooth/bluetooth_adapter.h b/chrome/browser/chromeos/bluetooth/bluetooth_adapter.h
index 599a221..726e85c 100644
--- a/chrome/browser/chromeos/bluetooth/bluetooth_adapter.h
+++ b/chrome/browser/chromeos/bluetooth/bluetooth_adapter.h
@@ -118,9 +118,9 @@ class BluetoothAdapter : private BluetoothManagerClient::Observer,
// Requests that the adapter either begin discovering new devices when
// |discovering| is true, or cease any discovery when false. On success,
// callback will be called. On failure, |error_callback| will be called.
- void SetDiscovering(bool discovering,
- const base::Closure& callback,
- const ErrorCallback& error_callback);
+ virtual void SetDiscovering(bool discovering,
+ const base::Closure& callback,
+ const ErrorCallback& error_callback);
// Requests the list of devices from the adapter, all are returned
// including those currently connected and those paired. Use the
diff --git a/chrome/browser/chromeos/bluetooth/test/mock_bluetooth_adapter.h b/chrome/browser/chromeos/bluetooth/test/mock_bluetooth_adapter.h
index 2b5f7bc..18869bb 100644
--- a/chrome/browser/chromeos/bluetooth/test/mock_bluetooth_adapter.h
+++ b/chrome/browser/chromeos/bluetooth/test/mock_bluetooth_adapter.h
@@ -6,7 +6,9 @@
#define CHROME_BROWSER_CHROMEOS_BLUETOOTH_TEST_MOCK_BLUETOOTH_ADAPTER_H_
#pragma once
+#include "base/callback.h"
#include "chrome/browser/chromeos/bluetooth/bluetooth_adapter.h"
+#include "chrome/browser/chromeos/bluetooth/bluetooth_device.h"
#include "testing/gmock/include/gmock/gmock.h"
namespace chromeos {
@@ -18,7 +20,10 @@ class MockBluetoothAdapter : public BluetoothAdapter {
MOCK_CONST_METHOD0(IsPresent, bool());
MOCK_CONST_METHOD0(IsPowered, bool());
-
+ MOCK_METHOD3(SetDiscovering,
+ void(bool discovering,
+ const base::Closure& callback,
+ const BluetoothAdapter::ErrorCallback& error_callback));
MOCK_CONST_METHOD0(GetDevices, ConstDeviceList());
};