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

Unified Diff: media/gpu/video_decode_accelerator_unittest.cc

Issue 2620653003: Add ScopedTaskScheduler in video_decode_accelerator_unittest.cc. (Closed)
Patch Set: self-review Created 3 years, 11 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 | « no previous file | 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 9611b14c1c6feae6f3f445f02cc936c552e94cf4..2079cdcf83a94739b500e31401ad2d55de8466e5 100644
--- a/media/gpu/video_decode_accelerator_unittest.cc
+++ b/media/gpu/video_decode_accelerator_unittest.cc
@@ -50,6 +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/test_suite.h"
#include "base/threading/thread.h"
#include "base/threading/thread_task_runner_handle.h"
@@ -1757,6 +1758,13 @@ class VDATestSuite : public base::TestSuite {
base::MessageLoop main_loop;
#endif // OS_WIN || USE_OZONE
+ base::test::ScopedTaskScheduler scoped_task_scheduler(&main_loop);
+
+ media::g_env =
+ reinterpret_cast<media::VideoDecodeAcceleratorTestEnvironment*>(
+ testing::AddGlobalTestEnvironment(
+ new media::VideoDecodeAcceleratorTestEnvironment()));
+
#if defined(USE_OZONE)
ui::OzonePlatform::InitializeForUI();
#endif
@@ -1839,11 +1847,6 @@ int main(int argc, char** argv) {
base::ShadowingAtExitManager at_exit_manager;
- media::g_env =
- reinterpret_cast<media::VideoDecodeAcceleratorTestEnvironment*>(
- testing::AddGlobalTestEnvironment(
- new media::VideoDecodeAcceleratorTestEnvironment()));
-
return base::LaunchUnitTestsSerially(
argc, argv,
base::Bind(&media::VDATestSuite::Run, base::Unretained(&test_suite)));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698