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

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

Issue 1156573005: bluetooth: Browser-side implementation of getCharacteristic (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bluetooth-get-primary-service-initial
Patch Set: Fix histograms.xml and bad_messages.h merge conflict Created 5 years, 6 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 fc8efb9ee67ae1853784f21c6e3e2094c858d9c3..00580e4bbf43c249174b2b381f6b2f08765e4849 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
@@ -10,7 +10,9 @@
#include "device/bluetooth/test/mock_bluetooth_adapter.h"
#include "device/bluetooth/test/mock_bluetooth_device.h"
#include "device/bluetooth/test/mock_bluetooth_discovery_session.h"
+#include "device/bluetooth/test/mock_bluetooth_gatt_characteristic.h"
#include "device/bluetooth/test/mock_bluetooth_gatt_service.h"
+
namespace content {
// Implements fake adapters with named mock data set for use in tests as a
@@ -71,7 +73,8 @@ class LayoutTestBluetoothAdapterProvider {
// - |IsPaired| returns true.
// - |GetUUIDs| returns a list with two UUIDs: "1800" and "1801".
// - |GetGattServices| returns a list with two services "Generic Access" and
- // "Generic Attribute".
+ // "Generic Attribute". "Generic Access" has a "Device Name" characteristic
+ // and "Generic Attribute" has a "Service Changed" characteristic.
static scoped_ptr<testing::NiceMock<device::MockBluetoothDevice>>
GetEmptyDevice(device::MockBluetoothAdapter* adapter);
@@ -96,7 +99,18 @@ class LayoutTestBluetoothAdapterProvider {
// - |IsPrimary| returns true.
// - |GetDevice| returns |device|.
static scoped_ptr<testing::NiceMock<device::MockBluetoothGattService>>
- GetMockService(device::MockBluetoothDevice* device, const std::string& uuid);
+ GetGattService(device::MockBluetoothDevice* device, const std::string& uuid);
+
+ // Returns a fake BluetoothGattCharacteristic with the following
+ // characteristics:
+ // - |GetIdentifier| returns |uuid|.
+ // - |GetUUID| returns BluetoothUUID(|uuid|).
+ // - |IsLocal| returns false.
+ // - |GetService| returns |service|.
+ // - |IsNotifying| returns false.
+ static scoped_ptr<testing::NiceMock<device::MockBluetoothGattCharacteristic>>
+ GetGattCharacteristic(device::MockBluetoothGattService* service,
+ const std::string& uuid);
};
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698