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

Unified Diff: ui/aura/test/test_suite.cc

Issue 8240006: Use a mocked compositor for unit tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ui/gfx/test/gfx_test_utils x4 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: ui/aura/test/test_suite.cc
diff --git a/ui/aura/test/test_suite.cc b/ui/aura/test/test_suite.cc
index 5193de117af12656819e81a445f89c6387ea5388..1551de14f371e5c61b5f00bca8e064f792b05d8c 100644
--- a/ui/aura/test/test_suite.cc
+++ b/ui/aura/test/test_suite.cc
@@ -9,8 +9,9 @@
#include "build/build_config.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/base/ui_base_paths.h"
+#include "ui/gfx/compositor/test_compositor.h"
#include "ui/gfx/gfx_paths.h"
-#include "ui/gfx/gl/gl_implementation.h"
+#include "ui/gfx/test/gfx_test_utils.h"
namespace aura {
namespace test {
@@ -19,9 +20,6 @@ AuraTestSuite::AuraTestSuite(int argc, char** argv)
: TestSuite(argc, argv) {}
void AuraTestSuite::Initialize() {
-#if defined(OS_LINUX)
- gfx::InitializeGLBindings(gfx::kGLImplementationOSMesaGL);
-#endif
base::TestSuite::Initialize();
gfx::RegisterPathProvider();
@@ -30,6 +28,9 @@ void AuraTestSuite::Initialize() {
// Force unittests to run using en-US so if we test against string
// output, it'll pass regardless of the system language.
ui::ResourceBundle::InitSharedInstance("en-US");
+
+ // Use a mock compositor that noops draws.
+ ui::gfx_test_utils::SetupTestCompositor();
}
void AuraTestSuite::Shutdown() {

Powered by Google App Engine
This is Rietveld 408576698