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

Unified Diff: gpu/command_buffer/common/unittest_main.cc

Issue 1208603002: content: implement unittests backend for Ozone GBM Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: exclude content_unittests as all GMBs tests are moved to gpu_unittests Created 4 years, 8 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 | ui/gl/test/run_all_unittests.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/common/unittest_main.cc
diff --git a/gpu/command_buffer/common/unittest_main.cc b/gpu/command_buffer/common/unittest_main.cc
index ed03dca8b6f2fee0183e3c7d29fb69f33875a7ca..a76adeb04888f9795187f63baf4538ff62753de5 100644
--- a/gpu/command_buffer/common/unittest_main.cc
+++ b/gpu/command_buffer/common/unittest_main.cc
@@ -3,10 +3,28 @@
// found in the LICENSE file.
#include "base/bind.h"
+#include "base/command_line.h"
#include "base/test/launcher/unit_test_launcher.h"
#include "base/test/test_suite.h"
+#if defined(USE_OZONE)
+#include "base/message_loop/message_loop.h"
+#include "ui/ozone/public/client_native_pixmap_factory.h"
+#include "ui/ozone/public/ozone_gpu_test_helper.h"
+#endif
+
int main(int argc, char** argv) {
+ base::CommandLine::Init(argc, argv);
+ base::AtExitManager exit_manager;
+#if defined(USE_OZONE)
+ base::MessageLoopForUI message_loop;
+ std::unique_ptr<ui::OzoneInitializerForTest> ozone_test =
+ ui::OzoneInitializerForTest::Create();
+ std::unique_ptr<ui::ClientNativePixmapFactory> client_native_pixmap_factory_ =
+ ui::ClientNativePixmapFactory::Create();
+ ui::ClientNativePixmapFactory::SetInstance(
+ client_native_pixmap_factory_.get());
+#endif
base::TestSuite test_suite(argc, argv);
return base::LaunchUnitTests(
argc, argv,
« no previous file with comments | « no previous file | ui/gl/test/run_all_unittests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698