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

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: testsuite subclasses 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..ebe1a0d95adabb9e5bce911134fcfcc33248f579 100644
--- a/ui/aura/test/test_suite.cc
+++ b/ui/aura/test/test_suite.cc
@@ -9,6 +9,8 @@
#include "build/build_config.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/base/ui_base_paths.h"
+#include "ui/gfx/compositor/compositor.h"
+#include "ui/gfx/compositor/test_compositor.h"
#include "ui/gfx/gfx_paths.h"
#include "ui/gfx/gl/gl_implementation.h"
@@ -30,6 +32,10 @@ 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::Compositor::set_compositor_factory_for_testing(
+ ui::TestCompositor::Create);
}
void AuraTestSuite::Shutdown() {

Powered by Google App Engine
This is Rietveld 408576698