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

Unified Diff: content/common/gpu/media/video_decode_accelerator_unittest.cc

Issue 949183004: Fix at_exit error in video_decode tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 10 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: 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 f88b2c5a810de298ae0e5c56bdbbb70baa3e627d..be59e0d35fdd31b8c3b8086fb1679176b454e277 100644
--- a/content/common/gpu/media/video_decode_accelerator_unittest.cc
+++ b/content/common/gpu/media/video_decode_accelerator_unittest.cc
@@ -231,17 +231,23 @@ class VideoDecodeAcceleratorTestEnvironment : public ::testing::Environment {
done.Wait();
#if defined(USE_OZONE)
+ gpu_helper_.reset(new ui::OzoneGpuTestHelper());
// Need to initialize after the rendering side since the rendering side
// initializes the "GPU" parts of Ozone.
//
// This also needs to be done in the test environment since this shouldn't
// be initialized multiple times for the same Ozone platform.
- gpu_helper_.Initialize(base::ThreadTaskRunnerHandle::Get(),
- GetRenderingTaskRunner());
+ gpu_helper_->Initialize(base::ThreadTaskRunnerHandle::Get(),
+ GetRenderingTaskRunner());
#endif
}
- void TearDown() override { rendering_thread_.Stop(); }
+ void TearDown() override {
+#if defined(USE_OZONE)
+ gpu_helper_.reset();
+#endif
+ rendering_thread_.Stop();
+ }
scoped_refptr<base::SingleThreadTaskRunner> GetRenderingTaskRunner() const {
return rendering_thread_.task_runner();
@@ -250,7 +256,7 @@ class VideoDecodeAcceleratorTestEnvironment : public ::testing::Environment {
private:
base::Thread rendering_thread_;
#if defined(USE_OZONE)
- ui::OzoneGpuTestHelper gpu_helper_;
+ scoped_ptr<ui::OzoneGpuTestHelper> gpu_helper_;
#endif
DISALLOW_COPY_AND_ASSIGN(VideoDecodeAcceleratorTestEnvironment);
« 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