Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(263)

Unified Diff: views/run_all_unittests.cc

Issue 7104039: First draft to enable turning off compositor for unit tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Revised to add conditional compilation guards. Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/gfx/compositor/compositor_gl.cc ('k') | views/view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/run_all_unittests.cc
diff --git a/views/run_all_unittests.cc b/views/run_all_unittests.cc
index 611a77c047202e63f48810f84c55afee2b2d32f5..3a0e106f12044ab32ef402c44a13e00f79487a8c 100644
--- a/views/run_all_unittests.cc
+++ b/views/run_all_unittests.cc
@@ -6,6 +6,7 @@
#include "base/test/test_suite.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/base/ui_base_paths.h"
+#include "views/view.h"
class ViewTestSuite : public base::TestSuite {
public:
@@ -17,6 +18,11 @@ class ViewTestSuite : public base::TestSuite {
ui::RegisterPathProvider();
base::TestSuite::Initialize();
ResourceBundle::InitSharedInstance("en-US");
+
+#if defined(TOUCH_UI)
+ // Disable GPU browser compositor during unit tests.
+ views::View::set_use_acceleration_when_possible(false);
+#endif
}
};
« no previous file with comments | « ui/gfx/compositor/compositor_gl.cc ('k') | views/view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698