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

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

Issue 273073002: Changes code using Compositor to pass in ContextFactory (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix tooltip on chromeos 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.h ('k') | chrome/test/base/view_event_test_base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/base/browser_with_test_window_test.cc
diff --git a/chrome/test/base/browser_with_test_window_test.cc b/chrome/test/base/browser_with_test_window_test.cc
index 5d7cd98cc4d2149691e8360ff125694c5ee3e78b..06e33c02c7181b90910ddbbe50a7ef4105f3e6a6 100644
--- a/chrome/test/base/browser_with_test_window_test.cc
+++ b/chrome/test/base/browser_with_test_window_test.cc
@@ -19,6 +19,7 @@
#if defined(USE_AURA)
#include "ui/aura/test/aura_test_helper.h"
+#include "ui/compositor/compositor.h"
#include "ui/compositor/test/context_factories_for_test.h"
#include "ui/wm/core/default_activation_client.h"
#endif
@@ -68,15 +69,16 @@ void BrowserWithTestWindowTest::SetUp() {
#elif defined(USE_AURA)
// 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);
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());
#endif // USE_AURA
#if !defined(OS_CHROMEOS) && defined(TOOLKIT_VIEWS)
- views_delegate_.reset(CreateViewsDelegate());
+ views_delegate_.reset(CreateViewsDelegate(context_factory));
#endif
// Subclasses can provide their own Profile.
@@ -242,11 +244,14 @@ Browser* BrowserWithTestWindowTest::CreateBrowser(
}
#if !defined(OS_CHROMEOS) && defined(TOOLKIT_VIEWS)
-views::ViewsDelegate* BrowserWithTestWindowTest::CreateViewsDelegate() {
+views::ViewsDelegate* BrowserWithTestWindowTest::CreateViewsDelegate(
+ ui::ContextFactory* context_factory) {
#if defined(USE_ASH)
- return new ash::test::AshTestViewsDelegate;
+ views::TestViewsDelegate* delegate = new ash::test::AshTestViewsDelegate;
#else
- return new views::TestViewsDelegate;
+ views::TestViewsDelegate* delegate = new views::TestViewsDelegate;
#endif
+ delegate->set_context_factory(context_factory);
+ return delegate;
}
#endif
« no previous file with comments | « chrome/test/base/browser_with_test_window_test.h ('k') | chrome/test/base/view_event_test_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698