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 2ef2df31c37492ee08de023807e45665aa6d2b43..3caa3e078f4ab347c0dedf96f93422c43c4561bb 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 |
| @@ -26,23 +26,49 @@ class LayoutTestBluetoothAdapterProvider { |
| private: |
| // Returns "EmptyAdapter" fake BluetoothAdapter with the following |
| // characteristics: |
| - // - |StartDiscoverySession| runs the first argument with |DiscoverySession| |
| + // - |StartDiscoverySession| runs the success callback with |
| + // |DiscoverySession| |
| // as argument. |
| // - |GetDevices| returns an empty list of devices. |
| static scoped_refptr<testing::NiceMock<device::MockBluetoothAdapter>> |
| GetEmptyAdapter(); |
| + // Returns a fake BluetoothAdapter that asserts that its |
| + // StartDiscoverySessionWithFilter() method is called with a filter consisting |
| + // of the standard battery, heart rate, and glucose services. |
| + // - |StartDiscoverySession| runs the success callback with |
| + // |DiscoverySession| |
| + // as argument. |
| + // - |GetDevices| returns an empty list of devices. |
|
scheib
2015/06/16 03:12:06
returns a "Battery Device"
Jeffrey Yasskin
2015/06/16 19:11:40
Done.
|
| + static scoped_refptr<testing::NiceMock<device::MockBluetoothAdapter>> |
| + GetScanFilterCheckingAdapter(); |
| + |
| // Returns "SingleEmptyDeviceAdapter" fake BluetoothAdapter with the following |
| // characteristics: |
| - // - |StartDiscoverySession| runs the first argument with |DiscoverySession| |
| + // - |StartDiscoverySession| runs the success callback with |
| + // |DiscoverySession| |
| // as argument. |
| // - |GetDevices| returns a list with an |EmptyDevice|. |
| static scoped_refptr<testing::NiceMock<device::MockBluetoothAdapter>> |
| GetSingleEmptyDeviceAdapter(); |
| + // Returns "MultiDeviceAdapter", a fake BluetoothAdapter with the following |
| + // characteristics: |
| + // - |StartDiscoverySession| runs the success callback with |
| + // |DiscoverySession| |
| + // as argument. |
| + // - |GetDevices| returns a list with 2 devices: |
| + // - GetUUIDs() returns a Heart Rate Service, |
| + // and GetName() returns "Heart Rate Device". |
| + // - GetUUIDs() returns a Glucose Service, |
| + // and GetName() returns "Glucose Device". |
| + static scoped_refptr<testing::NiceMock<device::MockBluetoothAdapter>> |
| + GetMultiDeviceAdapter(); |
| + |
| // Returns "ConnectableDeviceAdapter" fake BluetoothAdapter with the |
| // following characteristics: |
| - // - |StartDiscoverySession| runs the first argument with |DiscoverySession| |
| + // - |StartDiscoverySession| runs the success callback with |
| + // |DiscoverySession| |
| // as argument. |
| // - |GetDevices| returns a list with a |ConnectableDevice|. |
| static scoped_refptr<testing::NiceMock<device::MockBluetoothAdapter>> |
| @@ -50,14 +76,15 @@ class LayoutTestBluetoothAdapterProvider { |
| // Returns "UnconnectableDeviceAdapter" fake BluetoothAdapter with the |
| // following characteristics: |
| - // - |StartDiscoverySession| runs the first argument with |DiscoverySession| |
| + // - |StartDiscoverySession| runs the success callback 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. |
| + // - |Stop| runs the success callback. |
| static scoped_ptr<testing::NiceMock<device::MockBluetoothDiscoverySession>> |
| GetDiscoverySession(); |
| @@ -77,7 +104,8 @@ class LayoutTestBluetoothAdapterProvider { |
| // "Empty Mock Device Name", and a "Reconnection Address" characteristic |
| // which can't be read. |
| static scoped_ptr<testing::NiceMock<device::MockBluetoothDevice>> |
| - GetEmptyDevice(device::MockBluetoothAdapter* adapter); |
| + GetEmptyDevice(device::MockBluetoothAdapter* adapter, |
| + const std::string& device_name = "Empty Mock Device"); |
| // Returns a fake |ConnectableDevice| with the same characteristics as |
| // |EmptyDevice| except: |