Index: ui/base/test/run_all_unittests.cc |
diff --git a/ui/base/test/run_all_unittests.cc b/ui/base/test/run_all_unittests.cc |
index 42156316e77c3251ee8425c7e4eee819572de581..ebd56657bd05e9dbc0ecf5226b3fbe258fe49eaa 100644 |
--- a/ui/base/test/run_all_unittests.cc |
+++ b/ui/base/test/run_all_unittests.cc |
@@ -10,6 +10,7 @@ |
#include "build/build_config.h" |
#include "ui/base/resource/resource_bundle.h" |
#include "ui/base/ui_base_paths.h" |
+#include "ui/gl/gl_surface.h" |
#if defined(OS_ANDROID) |
#include "base/android/jni_android.h" |
@@ -47,6 +48,13 @@ UIBaseTestSuite::UIBaseTestSuite(int argc, char** argv) |
void UIBaseTestSuite::Initialize() { |
base::TestSuite::Initialize(); |
+#if defined(OS_CHROMEOS) |
+ // Needed for the tests in ui/chromeos. |
+ // TODO(pkotwicz): Move the tests in ui/chromeos to their own test suite. |
+ // (crbug.com/432538) |
+ gfx::GLSurface::InitializeOneOffForTests(); |
+#endif |
+ |
#if defined(OS_WIN) |
gfx::InitDeviceScaleFactor(1.0); |
#endif |