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

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

Issue 1159523002: bluetooth: Browser side partial implementation of getPrimaryService. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: s/sevice/service Created 5 years, 7 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 ecf045af432cd8173fd91b77e3867cdb10eecc34..fc8efb9ee67ae1853784f21c6e3e2094c858d9c3 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,7 @@
#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_service.h"
namespace content {
// Implements fake adapters with named mock data set for use in tests as a
@@ -70,6 +70,8 @@ class LayoutTestBluetoothAdapterProvider {
// - |GetDeviceID| returns 2.
// - |IsPaired| returns true.
// - |GetUUIDs| returns a list with two UUIDs: "1800" and "1801".
+ // - |GetGattServices| returns a list with two services "Generic Access" and
scheib 2015/05/28 23:09:16 EmptyDevice doesn't seem so empty if it has Servic
ortuno 2015/05/29 17:53:55 But it's already advertising two UUIDs. Also these
+ // "Generic Attribute".
static scoped_ptr<testing::NiceMock<device::MockBluetoothDevice>>
GetEmptyDevice(device::MockBluetoothAdapter* adapter);
@@ -86,6 +88,15 @@ class LayoutTestBluetoothAdapterProvider {
// |BluetoothDevice::ERROR_FAILED| as argument.
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>>
+ GetMockService(device::MockBluetoothDevice* device, const std::string& uuid);
};
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698