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

Unified Diff: content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.h

Issue 1120373004: bluetooth: Browser-side implementation of connectGATT. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bluetooth-request-device-implementation
Patch Set: Address scheib's comments Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.h
diff --git a/content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.h b/content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.h
index 6f6af12d624a15c9bb15d9369a5b16329720f82c..4083dcbd413a83b612cca6f5da8acfa1139fdb31 100644
--- a/content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.h
+++ b/content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.h
@@ -6,6 +6,7 @@
#define CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_BLUETOOTH_ADAPTER_PROVIDER_H_
#include "base/callback.h"
+#include "base/strings/utf_string_conversions.h"
Jeffrey Yasskin 2015/05/20 22:19:48 Do you still need this in the header?
ortuno 2015/05/20 23:35:20 Done.
#include "device/bluetooth/bluetooth_adapter_factory.h"
#include "device/bluetooth/test/mock_bluetooth_adapter.h"
#include "device/bluetooth/test/mock_bluetooth_device.h"
@@ -38,7 +39,23 @@ class LayoutTestBluetoothAdapterProvider {
static scoped_refptr<testing::NiceMock<device::MockBluetoothAdapter>>
GetSingleEmptyDeviceAdapter();
- // Returns a fake DiscoverySession with the following characteristics:
+ // Returns "ConnectableDeviceAdapter" fake BluetoothAdapter with the
+ // following characteristics:
+ // - |StartDiscoverySession| runs the first argument with |DiscoverySession|
+ // as argument.
+ // - |GetDevices| returns a list with a |ConnectableDevice|.
+ static scoped_refptr<testing::NiceMock<device::MockBluetoothAdapter>>
+ GetConnectableDeviceAdapter();
+
+ // Returns "UnconnectableDeviceAdapter" fake BluetoothAdapter with the
+ // following characteristics:
+ // - |StartDiscoverySession| runs the first argument with |DiscoverySession|
+ // as argument.
+ // - |GetDevices| returns a list with an |UnconnectableDevice|.
+ static scoped_refptr<testing::NiceMock<device::MockBluetoothAdapter>>
+ GetUnconnectableDeviceAdapter();
+
+ // Returns a fake |DiscoverySession| with the following characteristics:
// - |Stop| runs the first argument.
static scoped_ptr<testing::NiceMock<device::MockBluetoothDiscoverySession>>
GetDiscoverySession();
@@ -56,6 +73,20 @@ class LayoutTestBluetoothAdapterProvider {
// - |GetUUIDs| returns a list with two UUIDs: "1800" and "1801".
static scoped_ptr<testing::NiceMock<device::MockBluetoothDevice>>
GetEmptyDevice(device::MockBluetoothAdapter* adapter);
+
+ // Returns a fake |ConnectableDevice| with the same characteristics as
+ // |EmptyDevice| except:
+ // - |CreateGattConnection| runs sucess callback with a
Jeffrey Yasskin 2015/05/20 22:19:48 sp: sucess
ortuno 2015/05/20 23:35:20 Done.
+ // fake BluetoothGattConnection as argument.
+ static scoped_ptr<testing::NiceMock<device::MockBluetoothDevice>>
+ GetConnectableDevice(device::MockBluetoothAdapter* adapter);
+
+ // Returns a fake |UnconnectableDevice| with the same characteristics as
+ // |EmptyDevice| except:
+ // - |CreateGattConnection| runs error callback with
+ // |BluetoothDevice::ERROR_FAILED| as argument.
+ static scoped_ptr<testing::NiceMock<device::MockBluetoothDevice>>
+ GetUnconnectableDevice(device::MockBluetoothAdapter* adapter);
};
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698