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

Unified Diff: ui/views/test/views_test_base.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 | « ui/views/test/views_test_base.h ('k') | ui/views/test/views_test_helper.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/test/views_test_base.cc
diff --git a/ui/views/test/views_test_base.cc b/ui/views/test/views_test_base.cc
index 5b7f5c1f2b22a911f10f8e885c1fe1b8c12d58b5..2014b51707187bdb1c44a17525e0349e27048624 100644
--- a/ui/views/test/views_test_base.cc
+++ b/ui/views/test/views_test_base.cc
@@ -13,7 +13,8 @@
namespace views {
ViewsTestBase::ViewsTestBase()
- : setup_called_(false),
+ : context_factory_(NULL),
+ setup_called_(false),
teardown_called_(false) {
}
@@ -27,13 +28,17 @@ ViewsTestBase::~ViewsTestBase() {
void ViewsTestBase::SetUp() {
testing::Test::SetUp();
setup_called_ = true;
- if (!views_delegate_.get())
- views_delegate_.reset(new TestViewsDelegate());
+ TestViewsDelegate* test_views_delegate = NULL;
+ if (!views_delegate_.get()) {
+ test_views_delegate = new TestViewsDelegate;
+ views_delegate_.reset(test_views_delegate);
+ }
// The ContextFactory must exist before any Compositors are created.
bool enable_pixel_output = false;
- ui::InitializeContextFactoryForTests(enable_pixel_output);
+ context_factory_ = ui::InitializeContextFactoryForTests(enable_pixel_output);
+ views_delegate_->set_context_factory(context_factory_);
- test_helper_.reset(ViewsTestHelper::Create(&message_loop_));
+ test_helper_.reset(ViewsTestHelper::Create(&message_loop_, context_factory_));
test_helper_->SetUp();
ui::InitializeInputMethodForTesting();
}
« no previous file with comments | « ui/views/test/views_test_base.h ('k') | ui/views/test/views_test_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698