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

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

Issue 2615273002: Bump Bluetooth max filter name length from 29 bytes to 240 bytes (Closed)
Patch Set: Correct fake test value Created 3 years, 11 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.cc
diff --git a/content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc b/content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc
index 16b3c54101fe862d446299187044c16ed8f82ab3..2c8ec650e62eff05831a859800cbf16fa93e157b 100644
--- a/content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc
+++ b/content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc
@@ -182,6 +182,8 @@ LayoutTestBluetoothAdapterProvider::GetBluetoothAdapter(
return GetGlucoseHeartRateAdapter();
if (fake_adapter_name == "UnicodeDeviceAdapter")
return GetUnicodeDeviceAdapter();
+ if (fake_adapter_name == "DeviceNameLongerThan29BytesAdapter")
+ return GetDeviceNameLongerThan29BytesAdapter();
if (fake_adapter_name == "MissingServiceHeartRateAdapter")
return GetMissingServiceHeartRateAdapter();
if (fake_adapter_name == "MissingCharacteristicHeartRateAdapter")
@@ -401,6 +403,17 @@ LayoutTestBluetoothAdapterProvider::GetUnicodeDeviceAdapter() {
return adapter;
}
+// static
+scoped_refptr<NiceMockBluetoothAdapter>
+LayoutTestBluetoothAdapterProvider::GetDeviceNameLongerThan29BytesAdapter() {
+ scoped_refptr<NiceMockBluetoothAdapter> adapter(GetEmptyAdapter());
+
+ adapter->AddMockDevice(GetBaseDevice(adapter.get(),
+ "a_device_name_that_is_longer_than_29_bytes_but_shorter_than_240_bytes"));
+
+ return adapter;
+}
+
// Adds a device to |adapter| and notifies all observers about that new device.
// Mocks can call this asynchronously to cause changes in the middle of a test.
static void AddDevice(scoped_refptr<NiceMockBluetoothAdapter> adapter,

Powered by Google App Engine
This is Rietveld 408576698