Index: chrome/test/base/view_event_test_base.cc |
diff --git a/chrome/test/base/view_event_test_base.cc b/chrome/test/base/view_event_test_base.cc |
index 066d0b92be03de04579283206c6df29f3d4db97e..2822e652f2c4fd3273255161d9b8b1e33ade1041 100644 |
--- a/chrome/test/base/view_event_test_base.cc |
+++ b/chrome/test/base/view_event_test_base.cc |
@@ -31,6 +31,7 @@ |
#include "ui/aura/env.h" |
#include "ui/aura/root_window.h" |
#include "ui/aura/test/aura_test_helper.h" |
+#include "ui/compositor/test/context_factories_for_test.h" |
#include "ui/views/corewm/wm_state.h" |
#endif |
@@ -102,10 +103,13 @@ void ViewEventTestBase::SetUp() { |
ui::InitializeInputMethodForTesting(); |
gfx::NativeView context = NULL; |
-#if defined(USE_ASH) |
+#if defined(USE_AURA) |
// The ContextFactory must exist before any Compositors are created. |
- bool allow_test_contexts = true; |
- ui::InitializeContextFactoryForTests(allow_test_contexts); |
+ bool enable_pixel_output = false; |
+ ui::InitializeContextFactoryForTests(enable_pixel_output); |
+#endif |
+ |
+#if defined(USE_ASH) |
#if defined(OS_WIN) |
// http://crbug.com/154081 use ash::Shell code path below on win_ash bots when |
// interactive_ui_tests is brought up on that platform. |
@@ -134,8 +138,7 @@ void ViewEventTestBase::SetUp() { |
// the test screen. |
aura_test_helper_.reset( |
new aura::test::AuraTestHelper(base::MessageLoopForUI::current())); |
- bool allow_test_contexts = true; |
- aura_test_helper_->SetUp(allow_test_contexts); |
+ aura_test_helper_->SetUp(); |
context = aura_test_helper_->root_window(); |
#endif // !USE_ASH && USE_AURA |
@@ -162,11 +165,14 @@ void ViewEventTestBase::TearDown() { |
message_center::MessageCenter::Shutdown(); |
#endif // !OS_WIN |
aura::Env::DeleteInstance(); |
- ui::TerminateContextFactoryForTests(); |
#elif defined(USE_AURA) |
aura_test_helper_->TearDown(); |
#endif // !USE_ASH && USE_AURA |
+#if defined(USE_AURA) |
+ ui::TerminateContextFactoryForTests(); |
+#endif |
+ |
ui::ShutdownInputMethodForTesting(); |
views::ViewsDelegate::views_delegate = NULL; |