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

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

Issue 978263002: gpu: media: initialize ozone in vaapi_h264_decoder_unittest (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Pawel's nit Created 5 years, 9 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/vaapi_h264_decoder_unittest.cc
diff --git a/content/common/gpu/media/vaapi_h264_decoder_unittest.cc b/content/common/gpu/media/vaapi_h264_decoder_unittest.cc
index 4d20c233b2b32e3de189f1ad231299ce06287ba7..09c3333f4f280694673c6fd83a9cccd3d6e6a2f6 100644
--- a/content/common/gpu/media/vaapi_h264_decoder_unittest.cc
+++ b/content/common/gpu/media/vaapi_h264_decoder_unittest.cc
@@ -8,14 +8,20 @@
// See http://code.google.com/p/googletest/issues/detail?id=371
#include "testing/gtest/include/gtest/gtest.h"
+#include "base/at_exit.h"
#include "base/bind.h"
#include "base/command_line.h"
#include "base/files/file_util.h"
#include "base/logging.h"
+#include "base/message_loop/message_loop.h"
#include "content/common/gpu/media/vaapi_h264_decoder.h"
#include "media/base/video_decoder_config.h"
#include "third_party/libyuv/include/libyuv.h"
+#if defined(USE_OZONE)
+#include "ui/ozone/public/ozone_platform.h"
+#endif
+
// This program is run like this:
// DISPLAY=:0 ./vaapi_h264_decoder_unittest --input_file input.h264
// [--output_file output.i420] [--md5sum expected_md5_hex]
@@ -335,6 +341,8 @@ int main(int argc, char** argv) {
testing::InitGoogleTest(&argc, argv); // Removes gtest-specific args.
base::CommandLine::Init(argc, argv);
+ base::ShadowingAtExitManager at_exit_manager;
+
// Needed to enable DVLOG through --vmodule.
logging::LoggingSettings settings;
settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG;
@@ -362,8 +370,16 @@ int main(int argc, char** argv) {
}
if (it->first == "v" || it->first == "vmodule")
continue;
+ if (it->first == "ozone-platform")
+ continue;
LOG(FATAL) << "Unexpected switch: " << it->first << ":" << it->second;
}
+#if defined(USE_OZONE)
+ base::MessageLoopForUI main_loop;
+ ui::OzonePlatform::InitializeForUI();
+ ui::OzonePlatform::InitializeForGPU();
+#endif
+
return RUN_ALL_TESTS();
}
« 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