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

Unified Diff: chrome/test/base/chrome_test_suite.cc

Issue 8240006: Use a mocked compositor for unit tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge Created 9 years, 2 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
Index: chrome/test/base/chrome_test_suite.cc
diff --git a/chrome/test/base/chrome_test_suite.cc b/chrome/test/base/chrome_test_suite.cc
index ad54d70f43e0ba10c94f2ba953b8b19711183f74..e5b3e707ae6bb8ebba4d60eecd5758d0414918cb 100644
--- a/chrome/test/base/chrome_test_suite.cc
+++ b/chrome/test/base/chrome_test_suite.cc
@@ -27,10 +27,7 @@
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/base/ui_base_paths.h"
-
-#if defined(TOOLKIT_VIEWS)
-#include "views/view.h"
-#endif
+#include "ui/gfx/compositor/compositor_test_support.h"
#if defined(OS_MACOSX)
#include "base/mac/mac_util.h"
@@ -196,10 +193,8 @@ void ChromeTestSuite::Initialize() {
resources_pack_path.Append(FILE_PATH_LITERAL("resources.pak"));
ResourceBundle::AddDataPackToSharedInstance(resources_pack_path);
-#if defined(TOOLKIT_VIEWS) && defined(OS_LINUX)
- // Turn of GPU compositing in browser during unit tests.
- views::View::set_use_acceleration_when_possible(false);
-#endif
+ // Mock out the compositor on platforms that use it.
+ ui::CompositorTestSupport::SetupMockCompositor();
stats_filename_ = base::StringPrintf("unit_tests-%d",
base::GetCurrentProcId());

Powered by Google App Engine
This is Rietveld 408576698