| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_BLUETOOTH_ADAPTER_PROVIDER
_H_ | 5 #ifndef CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_BLUETOOTH_ADAPTER_PROVIDER
_H_ |
| 6 #define CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_BLUETOOTH_ADAPTER_PROVIDER
_H_ | 6 #define CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_BLUETOOTH_ADAPTER_PROVIDER
_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "device/bluetooth/bluetooth_adapter_factory.h" | 9 #include "device/bluetooth/bluetooth_adapter_factory.h" |
| 10 #include "device/bluetooth/test/mock_bluetooth_adapter.h" | 10 #include "device/bluetooth/test/mock_bluetooth_adapter.h" |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 // - |GetAddress| returns "Empty Mock Device instanceID". | 65 // - |GetAddress| returns "Empty Mock Device instanceID". |
| 66 // - |GetName| returns "Empty Mock Device name". | 66 // - |GetName| returns "Empty Mock Device name". |
| 67 // - |GetBluetoothClass| returns 0x1F00. "Unspecified Device Class": see | 67 // - |GetBluetoothClass| returns 0x1F00. "Unspecified Device Class": see |
| 68 // bluetooth.org/en-us/specification/assigned-numbers/baseband | 68 // bluetooth.org/en-us/specification/assigned-numbers/baseband |
| 69 // - |GetVendorIDSource| returns |BluetoothDevice::VENDOR_ID_BLUETOOTH|. | 69 // - |GetVendorIDSource| returns |BluetoothDevice::VENDOR_ID_BLUETOOTH|. |
| 70 // - |GetVendorID| returns 0xFFFF. | 70 // - |GetVendorID| returns 0xFFFF. |
| 71 // - |GetProductID| returns 1. | 71 // - |GetProductID| returns 1. |
| 72 // - |GetDeviceID| returns 2. | 72 // - |GetDeviceID| returns 2. |
| 73 // - |IsPaired| returns true. | 73 // - |IsPaired| returns true. |
| 74 // - |GetUUIDs| returns a list with two UUIDs: "1800" and "1801". | 74 // - |GetUUIDs| returns a list with two UUIDs: "1800" and "1801". |
| 75 // - |GetGattServices| returns a list with two services "Generic Access" and | 75 // - |GetGattServices| returns a list with one service "Generic Access". |
| 76 // "Generic Attribute". "Generic Access" has a "Device Name" characteristic | 76 // "Generic Access" has a "Device Name" characteristic, with a value of |
| 77 // and "Generic Attribute" has a "Service Changed" characteristic. | 77 // "Empty Mock Device Name", and a "Reconnection Address" characteristic |
| 78 // which can't be read. |
| 78 static scoped_ptr<testing::NiceMock<device::MockBluetoothDevice>> | 79 static scoped_ptr<testing::NiceMock<device::MockBluetoothDevice>> |
| 79 GetEmptyDevice(device::MockBluetoothAdapter* adapter); | 80 GetEmptyDevice(device::MockBluetoothAdapter* adapter); |
| 80 | 81 |
| 81 // Returns a fake |ConnectableDevice| with the same characteristics as | 82 // Returns a fake |ConnectableDevice| with the same characteristics as |
| 82 // |EmptyDevice| except: | 83 // |EmptyDevice| except: |
| 83 // - |CreateGattConnection| runs success callback with a | 84 // - |CreateGattConnection| runs success callback with a |
| 84 // fake BluetoothGattConnection as argument. | 85 // fake BluetoothGattConnection as argument. |
| 85 static scoped_ptr<testing::NiceMock<device::MockBluetoothDevice>> | 86 static scoped_ptr<testing::NiceMock<device::MockBluetoothDevice>> |
| 86 GetConnectableDevice(device::MockBluetoothAdapter* adapter); | 87 GetConnectableDevice(device::MockBluetoothAdapter* adapter); |
| 87 | 88 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 109 // - |GetService| returns |service|. | 110 // - |GetService| returns |service|. |
| 110 // - |IsNotifying| returns false. | 111 // - |IsNotifying| returns false. |
| 111 static scoped_ptr<testing::NiceMock<device::MockBluetoothGattCharacteristic>> | 112 static scoped_ptr<testing::NiceMock<device::MockBluetoothGattCharacteristic>> |
| 112 GetGattCharacteristic(device::MockBluetoothGattService* service, | 113 GetGattCharacteristic(device::MockBluetoothGattService* service, |
| 113 const std::string& uuid); | 114 const std::string& uuid); |
| 114 }; | 115 }; |
| 115 | 116 |
| 116 } // namespace content | 117 } // namespace content |
| 117 | 118 |
| 118 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_BLUETOOTH_ADAPTER_PROVI
DER_H_ | 119 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_BLUETOOTH_ADAPTER_PROVI
DER_H_ |
| OLD | NEW |