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

Unified Diff: ui/views/test/views_test_base.cc

Issue 1159033008: Refactor ViewsDelegate singleton (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 6 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
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 e508fd72096e7c8d0328a179fe87765a337f9fc5..784ce2e7fa0c236640f9e29f463aaef339ee7219 100644
--- a/ui/views/test/views_test_base.cc
+++ b/ui/views/test/views_test_base.cc
@@ -27,7 +27,7 @@ ViewsTestBase::~ViewsTestBase() {
void ViewsTestBase::SetUp() {
testing::Test::SetUp();
setup_called_ = true;
- if (!views_delegate_.get())
+ if (!views_delegate_)
views_delegate_.reset(new TestViewsDelegate());
// The ContextFactory must exist before any Compositors are created.
@@ -53,6 +53,8 @@ void ViewsTestBase::TearDown() {
ui::ShutdownInputMethodForTesting();
test_helper_->TearDown();
ui::TerminateContextFactoryForTests();
+
+ views_delegate_.reset();
}
void ViewsTestBase::RunPendingMessages() {

Powered by Google App Engine
This is Rietveld 408576698