| Index: ui/gl/test/run_all_unittests.cc
|
| diff --git a/ui/gl/test/run_all_unittests.cc b/ui/gl/test/run_all_unittests.cc
|
| index e9af318893aae5aa8e402bc30135e04485935725..cb2fd0ba0caf26a333544a41cfac7772daa94c8a 100644
|
| --- a/ui/gl/test/run_all_unittests.cc
|
| +++ b/ui/gl/test/run_all_unittests.cc
|
| @@ -12,6 +12,13 @@
|
| #include "base/test/mock_chrome_application_mac.h"
|
| #endif
|
|
|
| +#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"
|
| +#include "ui/ozone/public/ozone_platform.h"
|
| +#endif
|
| +
|
| namespace {
|
|
|
| class GlTestSuite : public base::TestSuite {
|
| @@ -23,6 +30,18 @@ class GlTestSuite : public base::TestSuite {
|
| void Initialize() override {
|
| base::TestSuite::Initialize();
|
|
|
| +#if defined(USE_OZONE)
|
| + scoped_ptr<base::MessageLoop> message_loop(new base::MessageLoopForUI);
|
| + ozone_backend_for_test_ = ui::OzoneInitializerForTest::Create();
|
| + DCHECK(ozone_backend_for_test_);
|
| +
|
| + client_native_pixmap_factory_ = ui::ClientNativePixmapFactory::Create();
|
| + ui::ClientNativePixmapFactory::SetInstance(
|
| + client_native_pixmap_factory_.get());
|
| + ui::ClientNativePixmapFactory::GetInstance()->Initialize(
|
| + ui::OzonePlatform::GetInstance()->OpenClientNativePixmapDevice());
|
| +#endif
|
| +// TODO(reveman): initialize SurfaceTextureManager or IOSurfaceManager
|
| #if defined(OS_MACOSX) && !defined(OS_IOS)
|
| mock_cr_app::RegisterMockCrApp();
|
| #endif
|
| @@ -33,6 +52,10 @@ class GlTestSuite : public base::TestSuite {
|
| }
|
|
|
| private:
|
| +#if defined(USE_OZONE)
|
| + scoped_ptr<ui::OzoneInitializerForTest> ozone_backend_for_test_;
|
| + scoped_ptr<ui::ClientNativePixmapFactory> client_native_pixmap_factory_;
|
| +#endif
|
| DISALLOW_COPY_AND_ASSIGN(GlTestSuite);
|
| };
|
|
|
|
|