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

Unified Diff: content/test/content_test_suite.cc

Issue 1208603002: content: implement unittests backend for Ozone GBM Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ContentTestSuite initialize message loop Created 5 years 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 | « content/test/content_test_suite.h ('k') | ui/ozone/public/ozone_gpu_test_helper.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/content_test_suite.cc
diff --git a/content/test/content_test_suite.cc b/content/test/content_test_suite.cc
index f7099dc369199518353f46ef4b43e2a3a93b6795..a3b5a645bb7c07b561f2762218efa30c3abef50a 100644
--- a/content/test/content_test_suite.cc
+++ b/content/test/content_test_suite.cc
@@ -7,6 +7,7 @@
#include "base/base_paths.h"
#include "base/base_switches.h"
#include "base/logging.h"
+#include "base/message_loop/message_loop.h"
#include "content/public/common/content_client.h"
#include "content/public/common/content_paths.h"
#include "content/public/test/test_content_client_initializer.h"
@@ -74,6 +75,9 @@ ContentTestSuite::~ContentTestSuite() {
}
void ContentTestSuite::Initialize() {
+ // Especially Ozone needs MessageLoopForUI.
+ scoped_ptr<base::MessageLoop> message_loop(new base::MessageLoopForUI);
+
#if defined(OS_MACOSX)
base::mac::ScopedNSAutoreleasePool autorelease_pool;
#if !defined(OS_IOS)
@@ -84,6 +88,10 @@ void ContentTestSuite::Initialize() {
#if defined(OS_WIN)
gfx::InitDeviceScaleFactor(1.0f);
#endif
+#if defined(USE_OZONE)
+ ozone_ = ui::OzoneInitializerForTest::Create();
spang 2015/12/14 17:51:37 Can you just call ui::OzonePlatform::InitializeFor
dshwang 2015/12/15 03:44:00 What OzoneInitializerForTest is doing is to initia
+ DCHECK(ozone_);
+#endif
ContentTestSuiteBase::Initialize();
{
« no previous file with comments | « content/test/content_test_suite.h ('k') | ui/ozone/public/ozone_gpu_test_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698