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

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

Issue 296053009: Makes Env contain a ContextFactory (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: foo Created 6 years, 7 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 | « chrome/test/base/browser_with_test_window_test.cc ('k') | content/browser/browser_main_loop.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 043bc30a07e9086df92b377811c97ea54cfe217d..d3c4f1cde51e6ec17c5a36b14d66788b2cdcaf63 100644
--- a/chrome/test/base/view_event_test_base.cc
+++ b/chrome/test/base/view_event_test_base.cc
@@ -109,7 +109,8 @@ void ViewEventTestBase::SetUp() {
// The ContextFactory must exist before any Compositors are created.
bool enable_pixel_output = false;
- ui::InitializeContextFactoryForTests(enable_pixel_output);
+ ui::ContextFactory* context_factory =
+ ui::InitializeContextFactoryForTests(enable_pixel_output);
#if defined(OS_CHROMEOS)
// Ash Shell can't just live on its own without a browser process, we need to
@@ -122,6 +123,7 @@ void ViewEventTestBase::SetUp() {
new ash::test::TestShellDelegate();
ash::ShellInitParams init_params;
init_params.delegate = shell_delegate;
+ init_params.context_factory = context_factory;
ash::Shell::CreateInstance(init_params);
shell_delegate->test_session_state_delegate()
->SetActiveUserSessionStarted(true);
@@ -133,12 +135,13 @@ void ViewEventTestBase::SetUp() {
gfx::Screen::SetScreenInstance(
gfx::SCREEN_TYPE_NATIVE, views::CreateDesktopScreen());
aura::Env::CreateInstance(true);
+ aura::Env::GetInstance()->set_context_factory(context_factory);
#elif defined(USE_AURA)
// Instead of using the ash shell, use an AuraTestHelper to create and manage
// the test screen.
aura_test_helper_.reset(
new aura::test::AuraTestHelper(base::MessageLoopForUI::current()));
- aura_test_helper_->SetUp();
+ aura_test_helper_->SetUp(context_factory);
new wm::DefaultActivationClient(aura_test_helper_->root_window());
context = aura_test_helper_->root_window();
#endif
« no previous file with comments | « chrome/test/base/browser_with_test_window_test.cc ('k') | content/browser/browser_main_loop.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698