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

Unified Diff: content/browser/media/capture/desktop_capture_device_aura_unittest.cc

Issue 2487073005: Remove direct usage of BrowserThreadImpl in tests (Closed)
Patch Set: The RDHImpl is actually not even necessary in ResourceSchedulerTest, removed. Created 4 years, 1 month 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/browser/media/capture/desktop_capture_device_aura_unittest.cc
diff --git a/content/browser/media/capture/desktop_capture_device_aura_unittest.cc b/content/browser/media/capture/desktop_capture_device_aura_unittest.cc
index 68bc898b42666b026b1f686e192ac4c4841ace53..6310b062b5f4ea9aeb03dfd2710bd099c1283f16 100644
--- a/content/browser/media/capture/desktop_capture_device_aura_unittest.cc
+++ b/content/browser/media/capture/desktop_capture_device_aura_unittest.cc
@@ -11,8 +11,8 @@
#include "base/location.h"
#include "base/macros.h"
#include "base/synchronization/waitable_event.h"
-#include "content/browser/browser_thread_impl.h"
#include "content/public/browser/desktop_media_id.h"
+#include "content/public/test/test_browser_thread_bundle.h"
#include "media/capture/video_capture_types.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -92,9 +92,8 @@ class MockDeviceClient : public media::VideoCaptureDevice::Client {
// Test harness that sets up a minimal environment with necessary stubs.
class DesktopCaptureDeviceAuraTest : public testing::Test {
public:
- DesktopCaptureDeviceAuraTest()
- : browser_thread_for_ui_(BrowserThread::UI, &message_loop_) {}
- ~DesktopCaptureDeviceAuraTest() override {}
+ DesktopCaptureDeviceAuraTest() = default;
+ ~DesktopCaptureDeviceAuraTest() override = default;
protected:
void SetUp() override {
@@ -102,7 +101,8 @@ class DesktopCaptureDeviceAuraTest : public testing::Test {
bool enable_pixel_output = false;
ui::ContextFactory* context_factory =
ui::InitializeContextFactoryForTests(enable_pixel_output);
- helper_.reset(new aura::test::AuraTestHelper(&message_loop_));
+ helper_.reset(
+ new aura::test::AuraTestHelper(base::MessageLoopForUI::current()));
helper_->SetUp(context_factory);
new wm::DefaultActivationClient(helper_->root_window());
@@ -131,8 +131,7 @@ class DesktopCaptureDeviceAuraTest : public testing::Test {
aura::Window* root_window() { return helper_->root_window(); }
private:
- base::MessageLoopForUI message_loop_;
- BrowserThreadImpl browser_thread_for_ui_;
+ TestBrowserThreadBundle thread_bundle_;
std::unique_ptr<aura::test::AuraTestHelper> helper_;
std::unique_ptr<aura::Window> desktop_window_;
std::unique_ptr<aura::test::TestWindowDelegate> window_delegate_;

Powered by Google App Engine
This is Rietveld 408576698