summaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authordanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-22 08:09:12 +0000
committerdanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-22 08:09:12 +0000
commit09962d0a7a720e25429981c3f5b3d6d21b2f7ef5 (patch)
tree3a512d428d694b9f20f1ca88f3a77c46d72a1f87 /ui
parentfe18c779e0fd9ea177bf7d8113cceb709ce170cf (diff)
downloadchromium_src-09962d0a7a720e25429981c3f5b3d6d21b2f7ef5.zip
chromium_src-09962d0a7a720e25429981c3f5b3d6d21b2f7ef5.tar.gz
chromium_src-09962d0a7a720e25429981c3f5b3d6d21b2f7ef5.tar.bz2
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
Diffstat (limited to 'ui')
-rw-r--r--ui/app_list/test/DEPS3
-rw-r--r--ui/app_list/test/run_all_unittests.cc7
-rw-r--r--ui/message_center/test/DEPS3
-rw-r--r--ui/message_center/test/run_all_unittests.cc7
4 files changed, 20 insertions, 0 deletions
diff --git a/ui/app_list/test/DEPS b/ui/app_list/test/DEPS
new file mode 100644
index 0000000..8d1340d
--- /dev/null
+++ b/ui/app_list/test/DEPS
@@ -0,0 +1,3 @@
+include_rules = [
+ "+ui/gl/gl_surface.h", # To initialize GL for tests.
+]
diff --git a/ui/app_list/test/run_all_unittests.cc b/ui/app_list/test/run_all_unittests.cc
index 6887f43..c10b376 100644
--- a/ui/app_list/test/run_all_unittests.cc
+++ b/ui/app_list/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 AppListTestSuite : public base::TestSuite {
@@ -19,6 +23,9 @@ class AppListTestSuite : public base::TestSuite {
protected:
virtual void Initialize() OVERRIDE {
+#if !defined(OS_MACOSX)
+ gfx::GLSurface::InitializeOneOffForTests(true);
+#endif
base::TestSuite::Initialize();
ui::RegisterPathProvider();
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();