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

Unified Diff: media/gpu/video_decode_accelerator_unittest.cc

Issue 2840593002: Remove usage of ScopedTaskScheduler. (Closed)
Patch Set: revert_client_cert_resolver_and_auto_connect_handler Created 3 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 | « media/base/demuxer_perftest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/gpu/video_decode_accelerator_unittest.cc
diff --git a/media/gpu/video_decode_accelerator_unittest.cc b/media/gpu/video_decode_accelerator_unittest.cc
index b1564cf6d0f043bffe4f90c36d30d6026bc2aef4..aaa16e178b4fcbee5f1b3446682be011afbe89ea 100644
--- a/media/gpu/video_decode_accelerator_unittest.cc
+++ b/media/gpu/video_decode_accelerator_unittest.cc
@@ -50,7 +50,7 @@
#include "base/synchronization/lock.h"
#include "base/synchronization/waitable_event.h"
#include "base/test/launcher/unit_test_launcher.h"
-#include "base/test/scoped_task_scheduler.h"
+#include "base/test/scoped_task_environment.h"
#include "base/test/test_suite.h"
#include "base/threading/thread.h"
#include "base/threading/thread_task_runner_handle.h"
@@ -1822,13 +1822,12 @@ class VDATestSuite : public base::TestSuite {
// which uses COM. We need the thread to be a UI thread.
// On Ozone, the backend initializes the event system using a UI
// thread.
- base::MessageLoopForUI main_loop;
+ base::test::ScopedTaskEnvironment scoped_task_environment(
+ base::test::ScopedTaskEnvironment::MainThreadType::UI);
#else
- base::MessageLoop main_loop;
+ base::test::ScopedTaskEnvironment scoped_task_environment;
#endif // OS_WIN || USE_OZONE
- base::test::ScopedTaskScheduler scoped_task_scheduler(&main_loop);
-
media::g_env =
reinterpret_cast<media::VideoDecodeAcceleratorTestEnvironment*>(
testing::AddGlobalTestEnvironment(
« no previous file with comments | « media/base/demuxer_perftest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698