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

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

Issue 2014473002: bluetooth: Web Bluetooth can filter by empty device names, doesn't leak MACs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bt-GetNameOrEmpty-
Patch Set: addressed nits Created 4 years, 4 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 041e7a8ef3cd977c3b1426fe37a22d0b2c11426b..94358bf243839a8925a464e201462971ba297fbe 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
@@ -182,6 +182,39 @@ class LayoutTestBluetoothAdapterProvider {
static scoped_refptr<testing::NiceMock<device::MockBluetoothAdapter>>
GetHeartRateAdapter();
+ // |GetEmptyNameHeartRateAdapter|
+ // Inherits from |EmptyAdapter|
+ // Internal Structure:
+ // - Heart Rate Device
+ // - UUIDs:
+ // - Generic Access UUID (0x1800)
+ // - Heart Rate UUID (0x180d)
+ // - Services:
+ // - Generic Access Service - Characteristics as described in
+ // GetGenericAccessService.
+ // - gap.device_name returns an empty string.
+ // - Heart Rate Service - Characteristics as described in
+ // GetHeartRateService.
+ static scoped_refptr<testing::NiceMock<device::MockBluetoothAdapter>>
+ GetEmptyNameHeartRateAdapter();
+
+ // |GetNoNameHeartRateAdapter|
+ // Inherits from |EmptyAdapter|
+ // Internal Structure:
+ // - Heart Rate Device
+ // - GetName returns base::null_opt.
+ // - UUIDs:
+ // - Generic Access UUID (0x1800)
+ // - Heart Rate UUID (0x180d)
+ // - Services:
+ // - Generic Access Service - Characteristics as described in
+ // GetGenericAccessService.
+ // - gap.device_name returns an empty string.
+ // - Heart Rate Service - Characteristics as described in
+ // GetHeartRateService.
+ static scoped_refptr<testing::NiceMock<device::MockBluetoothAdapter>>
+ GetNoNameHeartRateAdapter();
+
// |TwoHeartRateServicesAdapter|
// Inherits from |EmptyAdapter|
// Internal Structure:
@@ -460,7 +493,8 @@ class LayoutTestBluetoothAdapterProvider {
// None. Each user of the HeartRateDevice is in charge of adding the
// relevant services, characteristics and descriptors.
static std::unique_ptr<testing::NiceMock<device::MockBluetoothDevice>>
- GetHeartRateDevice(device::MockBluetoothAdapter* adapter);
+ GetHeartRateDevice(device::MockBluetoothAdapter* adapter,
+ const char* device_name = "Heart Rate Device");
// Services

Powered by Google App Engine
This is Rietveld 408576698