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

Unified Diff: content/shell/browser/layout_test/layout_test_browser_context.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: Remove member variables. 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_browser_context.cc
diff --git a/content/shell/browser/layout_test/layout_test_browser_context.cc b/content/shell/browser/layout_test/layout_test_browser_context.cc
index 891ba89a801afc92e9372eb024156e3b5e119717..7174e8d9f4f6694b2d7c593172534428801aea0b 100644
--- a/content/shell/browser/layout_test/layout_test_browser_context.cc
+++ b/content/shell/browser/layout_test/layout_test_browser_context.cc
@@ -11,6 +11,7 @@
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/push_messaging_service.h"
#include "content/public/browser/resource_context.h"
+#include "content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.h"
#include "content/shell/browser/layout_test/layout_test_download_manager_delegate.h"
#include "content/shell/browser/layout_test/layout_test_permission_manager.h"
#include "content/shell/browser/layout_test/layout_test_push_messaging_service.h"
@@ -67,7 +68,9 @@ void LayoutTestBrowserContext::GetBluetoothAdapterForTesting(
const std::string& fake_adapter_name,
const base::Callback<void(scoped_refptr<device::BluetoothAdapter> adapter)>&
callback) {
- // TODO(ortuno): Get mock data.
+ if (!bluetooth_adapter_provider_)
+ bluetooth_adapter_provider_.reset(new LayoutTestBluetoothAdapterProvider());
+ bluetooth_adapter_provider_->GetBluetoothAdapter(fake_adapter_name, callback);
}
PushMessagingService* LayoutTestBrowserContext::GetPushMessagingService() {

Powered by Google App Engine
This is Rietveld 408576698