Commit dffd09b3 authored by fdoray's avatar fdoray Committed by Commit bot

Add ScopedTaskScheduler in video_decode_accelerator_unittest.cc.

This is needed for the call to base::PostTaskWithTraits in
ui::DrmDisplayHostManager::ProcessEvent.

BUG=678598
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel

Review-Url: https://codereview.chromium.org/2620653003
Cr-Commit-Position: refs/heads/master@{#442898}
parent 031c65f2
......@@ -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"
......@@ -1765,6 +1766,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
......@@ -1847,11 +1855,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)));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment