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

Unified Diff: chrome/browser/extensions/api/bluetooth/bluetooth_event_router_unittest.cc

Issue 12546016: Remove the Extensions URLRequestContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments Created 7 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: chrome/browser/extensions/api/bluetooth/bluetooth_event_router_unittest.cc
diff --git a/chrome/browser/extensions/api/bluetooth/bluetooth_event_router_unittest.cc b/chrome/browser/extensions/api/bluetooth/bluetooth_event_router_unittest.cc
index 60b830a01e8b29411b65790fc2c10326ffc24df9..18c63f91b310321aed943b7107617762f1a58ebc 100644
--- a/chrome/browser/extensions/api/bluetooth/bluetooth_event_router_unittest.cc
+++ b/chrome/browser/extensions/api/bluetooth/bluetooth_event_router_unittest.cc
@@ -6,7 +6,6 @@
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
-#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
#include "chrome/browser/extensions/api/bluetooth/bluetooth_event_router.h"
#include "chrome/browser/extensions/event_names.h"
@@ -14,7 +13,7 @@
#include "chrome/browser/extensions/extension_system_factory.h"
#include "chrome/browser/extensions/test_extension_system.h"
#include "chrome/test/base/testing_profile.h"
-#include "content/public/test/test_browser_thread.h"
+#include "content/public/test/test_browser_thread_bundle.h"
#include "device/bluetooth/test/mock_bluetooth_adapter.h"
#include "device/bluetooth/test/mock_bluetooth_device.h"
#include "device/bluetooth/test/mock_bluetooth_profile.h"
@@ -84,8 +83,7 @@ class ExtensionBluetoothEventRouterTest : public testing::Test {
ExtensionBluetoothEventRouterTest()
: mock_adapter_(new testing::StrictMock<device::MockBluetoothAdapter>()),
test_profile_(new TestingProfile()),
- router_(test_profile_.get()),
- ui_thread_(content::BrowserThread::UI, &message_loop_) {
+ router_(test_profile_.get()) {
router_.SetAdapterForTest(mock_adapter_);
}
@@ -93,19 +91,17 @@ class ExtensionBluetoothEventRouterTest : public testing::Test {
// Some profile-dependent services rely on UI thread to clean up. We make
// sure they are properly cleaned up by running the UI message loop until
// idle.
- test_profile_.reset(NULL);
- base::RunLoop run_loop;
- run_loop.RunUntilIdle();
+ test_profile_.reset();
+ base::RunLoop().RunUntilIdle();
}
protected:
+ content::TestBrowserThreadBundle thread_bundle_;
testing::StrictMock<device::MockBluetoothAdapter>* mock_adapter_;
testing::NiceMock<device::MockBluetoothProfile> mock_audio_profile_;
testing::NiceMock<device::MockBluetoothProfile> mock_health_profile_;
scoped_ptr<TestingProfile> test_profile_;
ExtensionBluetoothEventRouter router_;
- base::MessageLoopForUI message_loop_;
- content::TestBrowserThread ui_thread_;
};
TEST_F(ExtensionBluetoothEventRouterTest, BluetoothEventListener) {

Powered by Google App Engine
This is Rietveld 408576698