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(); |
{ |