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

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

Issue 1242403002: bluetooth: Implement MissingCharacteristicAdapter and GetBaseGATTService. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bluetooth-tests-small-4
Patch Set: Add comment Created 5 years, 5 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
« no previous file with comments | « no previous file | content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1f5ad1d74f5004e5b7341fa5961099a5dfc59ce9..3a5a932a99c41540a02ab52a428b952de738574f 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
@@ -94,6 +94,15 @@ class LayoutTestBluetoothAdapterProvider {
static scoped_refptr<testing::NiceMock<device::MockBluetoothAdapter>>
GetMissingServiceGenericAccessAdapter();
+ // |MissingCharacteristicGenericAccessAdapter|
+ // Inherits from EmptyAdapter
+ // Internal Structure:
+ // - GenericAccessDevice
+ // - GenericAccess UUID (0x1800)
+ // - GenericAccessService
+ static scoped_refptr<testing::NiceMock<device::MockBluetoothAdapter>>
+ GetMissingCharacteristicGenericAccessAdapter();
+
// Discovery Sessions
// |DiscoverySession|
@@ -202,6 +211,31 @@ class LayoutTestBluetoothAdapterProvider {
device::MockBluetoothAdapter* adapter,
const std::string& device_name = "Generic Access Device");
+ // Services
+
+ // |BaseGATTService|
+ // Characteristics Added:
+ // None.
+ // Mock Functions:
+ // - GetCharacteristics:
+ // Returns a list with all the characteristics added to the service
+ // - GetCharacteristic:
+ // Returns a characteristic matching the identifier provided if the
+ // characteristic was added to the mock.
+ // - GetIdentifier:
+ // Returns: uuid + “ Identifier”
+ // - GetUUID:
+ // Returns: uuid
+ // - IsLocal:
+ // Returns: false
+ // - IsPrimary:
+ // Returns: true
+ // - GetDevice:
+ // Returns: device
+ static scoped_ptr<testing::NiceMock<device::MockBluetoothGattService>>
+ GetBaseGATTService(device::MockBluetoothDevice* device,
+ const std::string& uuid);
+
// The functions after this haven't been updated to the new design yet.
// Returns "SingleEmptyDeviceAdapter" fake BluetoothAdapter with the following
@@ -265,15 +299,6 @@ class LayoutTestBluetoothAdapterProvider {
static scoped_ptr<testing::NiceMock<device::MockBluetoothDevice>>
GetUnconnectableDevice(device::MockBluetoothAdapter* adapter);
- // Returns a fake BluetoothGattService with the following characteristics:
- // - |GetIdentifier| returns |uuid|.
- // - |GetUUID| returns BluetoothUUID(|uuid|).
- // - |IsLocal| returns false.
- // - |IsPrimary| returns true.
- // - |GetDevice| returns |device|.
- static scoped_ptr<testing::NiceMock<device::MockBluetoothGattService>>
- GetGattService(device::MockBluetoothDevice* device, const std::string& uuid);
-
// Returns a fake BluetoothGattCharacteristic with the following
// characteristics:
// - |GetIdentifier| returns |uuid|.
« no previous file with comments | « no previous file | content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698