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

Unified Diff: content/test/layouttest_support.cc

Issue 1125133005: bluetooth: Move testing IPC from BluetoothDispatcher to BlinkTestRunner (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix for stable release mode tests 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
« no previous file with comments | « content/shell/renderer/layout_test/blink_test_runner.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/layouttest_support.cc
diff --git a/content/test/layouttest_support.cc b/content/test/layouttest_support.cc
index 731f9918672f08bd8b40fbd6026c1a453c974e14..deb26ce9f755828348246c63ced53688e05536e1 100644
--- a/content/test/layouttest_support.cc
+++ b/content/test/layouttest_support.cc
@@ -7,8 +7,9 @@
#include "base/callback.h"
#include "base/lazy_instance.h"
#include "cc/blink/web_layer_impl.h"
+#include "content/browser/bluetooth/bluetooth_dispatcher_host.h"
+#include "content/browser/renderer_host/render_process_host_impl.h"
#include "content/browser/renderer_host/render_widget_host_impl.h"
-#include "content/child/bluetooth/web_bluetooth_impl.h"
#include "content/child/geofencing/web_geofencing_provider_impl.h"
#include "content/common/gpu/image_transport_surface.h"
#include "content/public/common/page_state.h"
@@ -312,11 +313,16 @@ void SetDeviceColorProfile(RenderView* render_view, const std::string& name) {
SetDeviceColorProfileForTesting(color_profile);
}
-void SetBluetoothMockDataSetForTesting(const std::string& name) {
- RenderThreadImpl::current()
- ->blink_platform_impl()
- ->BluetoothImplForTesting()
- ->SetBluetoothMockDataSetForTesting(name);
+void SetBluetoothAdapter(int render_process_id, const std::string& name) {
+ RenderProcessHostImpl* render_process_host_impl =
+ static_cast<RenderProcessHostImpl*>(
+ RenderProcessHost::FromID(render_process_id));
+
+ BluetoothDispatcherHost* dispatcher_host = render_process_host_impl
+ ->GetBluetoothDispatcherHost();
+
+ if (dispatcher_host != NULL)
scheib 2015/05/20 04:21:27 Just "if (dispatcher_host)" in C++
+ dispatcher_host->SetBluetoothAdapterForTesting(name);
}
void SetGeofencingMockProvider(bool service_available) {
« no previous file with comments | « content/shell/renderer/layout_test/blink_test_runner.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698