Chromium Code Reviews| 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..939d2d75e5ae14e006e32d8c990fc782c76a5c26 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" |
| #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 first argument with |
|
scheib
2015/05/20 20:14:08
... runs success callback ...
ortuno
2015/05/20 20:54:47
Done.
|
| + // |SuccessfulGattConnection| 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 second argument with |
|
scheib
2015/05/20 20:14:08
... runs error callback ...
ortuno
2015/05/20 20:54:47
Done.
|
| + // |BluetoothDevice::ERROR_FAILED| as argument. |
| + static scoped_ptr<testing::NiceMock<device::MockBluetoothDevice>> |
| + GetUnconnectableDevice(device::MockBluetoothAdapter* adapter); |
| }; |
| } // namespace content |