Index: content/common/gpu/media/video_decode_accelerator_unittest.cc |
diff --git a/content/common/gpu/media/video_decode_accelerator_unittest.cc b/content/common/gpu/media/video_decode_accelerator_unittest.cc |
index 3b9ec204cfda9e8d6f2da06fbbbda909d6b61e0a..10e50d4d493d730f8983e5710b7aa1708e435cad 100644 |
--- a/content/common/gpu/media/video_decode_accelerator_unittest.cc |
+++ b/content/common/gpu/media/video_decode_accelerator_unittest.cc |
@@ -956,19 +956,7 @@ VideoDecodeAcceleratorTest::VideoDecodeAcceleratorTest() |
void VideoDecodeAcceleratorTest::SetUp() { |
ParseAndReadTestVideoData(g_test_video_data, &test_video_files_); |
- |
- // Initialize the rendering thread. |
- base::Thread::Options options; |
- options.message_loop_type = base::MessageLoop::TYPE_DEFAULT; |
-#if defined(OS_WIN) || defined(USE_OZONE) |
- // For windows the decoding thread initializes the media foundation decoder |
- // which uses COM. We need the thread to be a UI thread. |
- // On Ozone, the backend initializes the event system using a UI |
- // thread. |
- options.message_loop_type = base::MessageLoop::TYPE_UI; |
-#endif // OS_WIN || USE_OZONE |
- |
- rendering_thread_.StartWithOptions(options); |
+ rendering_thread_.Start(); |
rendering_loop_proxy_ = rendering_thread_.message_loop_proxy(); |
} |
@@ -987,6 +975,7 @@ void VideoDecodeAcceleratorTest::TearDown() { |
done.Wait(); |
rendering_thread_.Stop(); |
+ rendering_helper_.TearDown(); |
} |
void VideoDecodeAcceleratorTest::ParseAndReadTestVideoData( |
@@ -1054,6 +1043,8 @@ void VideoDecodeAcceleratorTest::UpdateTestVideoFileParams( |
void VideoDecodeAcceleratorTest::InitializeRenderingHelper( |
const RenderingHelperParams& helper_params) { |
+ rendering_helper_.Setup(); |
+ |
base::WaitableEvent done(false, false); |
rendering_loop_proxy_->PostTask( |
FROM_HERE, |
@@ -1548,7 +1539,15 @@ int main(int argc, char **argv) { |
} |
base::ShadowingAtExitManager at_exit_manager; |
+#if defined(OS_WIN) || defined(USE_OZONE) |
+ // For windows the decoding thread initializes the media foundation decoder |
+ // 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; |
+#else |
base::MessageLoop main_loop; |
+#endif // OS_WIN || USE_OZONE |
content::RenderingHelper::InitializeOneOff(); |
return RUN_ALL_TESTS(); |