Commit 5545e869 authored by Chih-Yu Huang's avatar Chih-Yu Huang Committed by Commit Bot

media/gpu/test: Destroy test environment after run to idle.

media::VideoDecoder implementation may be destroyed on different
thread from the thread that the client releases it. We should make
sure the destruction is done before test environment is released.

This CL call RunUntilIdle() before releasing the test environment.

BUG=none
TEST=run video_decode_accelerator_perf_tests on Eve

Change-Id: Ifeec98da8c2f7a9798d45f973bcf2e4901bdb411
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1772874
Commit-Queue: Chih-Yu Huang <akahuang@chromium.org>
Reviewed-by: default avatarDavid Staessens <dstaessens@chromium.org>
Cr-Commit-Position: refs/heads/master@{#691540}
parent edc96b65
...@@ -78,6 +78,12 @@ void VideoTestEnvironment::SetUp() { ...@@ -78,6 +78,12 @@ void VideoTestEnvironment::SetUp() {
} }
void VideoTestEnvironment::TearDown() { void VideoTestEnvironment::TearDown() {
// Some implementations (like VideoDecoder) might be destroyed on a different
// thread from the thread that the client releases it on. Call RunUntilIdle()
// to ensure this kind of destruction is finished before |task_environment_|
// is destroyed.
task_environment_->RunUntilIdle();
task_environment_ = nullptr;
} }
base::FilePath::StringType VideoTestEnvironment::GetTestName() const { base::FilePath::StringType VideoTestEnvironment::GetTestName() const {
......
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