From 09962d0a7a720e25429981c3f5b3d6d21b2f7ef5 Mon Sep 17 00:00:00 2001 From: "danakj@chromium.org" Date: Sat, 22 Feb 2014 08:09:12 +0000 Subject: ui: message_center and app_list tests opt into real GL NullDraw contexts This breaks the dependency on the TestCompositor for these test suites. Once it's no longer in use by any test suite, we can remove it. These tests only compile in the compositor and ui/gl/ on non-Mac platforms, so only initialize GL there. Depends on: https://codereview.chromium.org/175093004/ R=ben@chromium.org BUG=270918 Review URL: https://codereview.chromium.org/168193003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@252771 0039d316-1c4b-4281-b951-d872f2087c98 --- ui/message_center/test/DEPS | 3 +++ ui/message_center/test/run_all_unittests.cc | 7 +++++++ 2 files changed, 10 insertions(+) create mode 100644 ui/message_center/test/DEPS (limited to 'ui/message_center') diff --git a/ui/message_center/test/DEPS b/ui/message_center/test/DEPS new file mode 100644 index 0000000..8d1340d --- /dev/null +++ b/ui/message_center/test/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+ui/gl/gl_surface.h", # To initialize GL for tests. +] diff --git a/ui/message_center/test/run_all_unittests.cc b/ui/message_center/test/run_all_unittests.cc index 094e128..64e408b 100644 --- a/ui/message_center/test/run_all_unittests.cc +++ b/ui/message_center/test/run_all_unittests.cc @@ -11,6 +11,10 @@ #include "ui/base/resource/resource_bundle.h" #include "ui/base/ui_base_paths.h" +#if !defined(OS_MACOSX) +#include "ui/gl/gl_surface.h" +#endif + namespace { class MessageCenterTestSuite : public base::TestSuite { @@ -19,6 +23,9 @@ class MessageCenterTestSuite : public base::TestSuite { protected: virtual void Initialize() OVERRIDE { +#if !defined(OS_MACOSX) + gfx::GLSurface::InitializeOneOffForTests(true); +#endif base::TestSuite::Initialize(); ui::RegisterPathProvider(); -- cgit v1.1