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

Unified Diff: content/test/layouttest_support.cc

Issue 1132943002: bluetooth: Move mock creation out of BluetoothDispatcherHost to LayoutTestBluetoothAdapterProvider. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bluetooth-testing-layout-tests
Patch Set: Add non const method 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/test/layouttest_support.cc
diff --git a/content/test/layouttest_support.cc b/content/test/layouttest_support.cc
index 0ae2b51f64c057de6a2306e285857f0272fc908a..eae4eb91bad5474ba3263c72737e187caf1240ac 100644
--- a/content/test/layouttest_support.cc
+++ b/content/test/layouttest_support.cc
@@ -24,6 +24,7 @@
#include "content/shell/renderer/test_runner/test_common.h"
#include "content/shell/renderer/test_runner/web_frame_test_proxy.h"
#include "content/shell/renderer/test_runner/web_test_proxy.h"
+#include "device/bluetooth/bluetooth_adapter.h"
#include "third_party/WebKit/public/platform/WebBatteryStatus.h"
#include "third_party/WebKit/public/platform/WebGamepads.h"
#include "third_party/WebKit/public/platform/modules/device_orientation/WebDeviceMotionData.h"
@@ -313,14 +314,15 @@ void SetDeviceColorProfile(RenderView* render_view, const std::string& name) {
SetDeviceColorProfileForTesting(color_profile);
}
-void SetBluetoothAdapter(int render_process_id, const std::string& name) {
+void SetBluetoothAdapter(int render_process_id,
+ scoped_refptr<device::BluetoothAdapter> adapter) {
RenderProcessHostImpl* render_process_host_impl =
static_cast<RenderProcessHostImpl*>(
RenderProcessHost::FromID(render_process_id));
render_process_host_impl
->GetBluetoothDispatcherHost()
- ->SetBluetoothAdapterForTesting(name);
+ ->SetBluetoothAdapterForTesting(adapter.Pass());
}
void SetGeofencingMockProvider(bool service_available) {

Powered by Google App Engine
This is Rietveld 408576698