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

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 jyasskin'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..3b2c30f5b72d3f32b7893a4c40d757ebeb7973b2 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
@@ -38,7 +38,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 +72,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 success callback with a
+ // 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