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

Unified Diff: ash/test/ash_test_helper.cc

Issue 45963003: Move test-only ContextFactory implementations out of production targets (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: revert bad ui/base changes Created 7 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
« no previous file with comments | « no previous file | ash/test/test_shell_delegate.cc » ('j') | ui/compositor/reflector.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/test/ash_test_helper.cc
diff --git a/ash/test/ash_test_helper.cc b/ash/test/ash_test_helper.cc
index 8981507cfd760f8ed94c2796eee4584cc9bd8325..4b84a2e6f31cd9f3bb97a2f542d43e7b5ddc1403 100644
--- a/ash/test/ash_test_helper.cc
+++ b/ash/test/ash_test_helper.cc
@@ -19,6 +19,7 @@
#include "ui/aura/test/env_test_helper.h"
#include "ui/base/ime/input_method_initializer.h"
#include "ui/compositor/scoped_animation_duration_scale_mode.h"
+#include "ui/compositor/test/context_factories_for_test.h"
#include "ui/message_center/message_center.h"
#include "ui/views/corewm/capture_controller.h"
@@ -54,6 +55,9 @@ void AshTestHelper::SetUp(bool start_session) {
ui::ScopedAnimationDurationScaleMode::ZERO_DURATION));
ui::InitializeInputMethodForTesting();
+ bool allow_test_contexts = true;
+ ui::InitializeContextFactoryForTests(allow_test_contexts);
+
// Creates Shell and hook with Desktop.
test_shell_delegate_ = new TestShellDelegate;
@@ -111,6 +115,7 @@ void AshTestHelper::TearDown() {
#endif
aura::Env::DeleteInstance();
+ ui::TerminateContextFactoryForTests();
// Need to reset the initial login status.
TestSystemTrayDelegate::SetInitialLoginStatus(user::LOGGED_IN_USER);
« no previous file with comments | « no previous file | ash/test/test_shell_delegate.cc » ('j') | ui/compositor/reflector.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698