| 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 e84d8c397cc55a8a0941552b153401ef28e17c10..e2d04e25a8a3a9c377340b94e2cbe34701109def 100644
|
| --- a/ui/gl/test/run_all_unittests.cc
|
| +++ b/ui/gl/test/run_all_unittests.cc
|
| @@ -3,6 +3,7 @@
|
| // found in the LICENSE file.
|
|
|
| #include "base/bind.h"
|
| +#include "base/message_loop/message_loop.h"
|
| #include "base/test/launcher/unit_test_launcher.h"
|
| #include "base/test/test_suite.h"
|
|
|
| @@ -10,6 +11,12 @@
|
| #include "base/test/mock_chrome_application_mac.h"
|
| #endif
|
|
|
| +#if defined(USE_OZONE)
|
| +#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 {
|
| @@ -19,8 +26,20 @@ class GlTestSuite : public base::TestSuite {
|
|
|
| protected:
|
| void Initialize() override {
|
| + scoped_ptr<base::MessageLoop> message_loop(new base::MessageLoopForUI);
|
| base::TestSuite::Initialize();
|
|
|
| +#if defined(USE_OZONE)
|
| + ozone_ = ui::OzoneInitializerForTest::Create();
|
| + DCHECK(ozone_);
|
| +
|
| + 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
|
| @@ -31,6 +50,10 @@ class GlTestSuite : public base::TestSuite {
|
| }
|
|
|
| private:
|
| +#if defined(USE_OZONE)
|
| + scoped_ptr<ui::OzoneInitializerForTest> ozone_;
|
| + scoped_ptr<ui::ClientNativePixmapFactory> client_native_pixmap_factory_;
|
| +#endif
|
| DISALLOW_COPY_AND_ASSIGN(GlTestSuite);
|
| };
|
|
|
|
|