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

Unified Diff: ui/aura/test/aura_test_base.cc

Issue 9535025: Remove the singleton instance get/delete methods from RootWindow (yay) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 10 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/aura/test/aura_test_base.h ('k') | ui/views/test/views_test_base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/test/aura_test_base.cc
===================================================================
--- ui/aura/test/aura_test_base.cc (revision 124527)
+++ ui/aura/test/aura_test_base.cc (working copy)
@@ -10,34 +10,33 @@
namespace aura {
namespace test {
-AuraTestBase::AuraTestBase() : root_window_(RootWindow::GetInstance()) {
- helper_.InitRootWindow(root_window_);
+AuraTestBase::AuraTestBase() {
}
AuraTestBase::~AuraTestBase() {
- // Flush the message loop because we have pending release tasks
- // and these tasks if un-executed would upset Valgrind.
- helper_.RunAllPendingInMessageLoop(root_window_);
-
- // Ensure that we don't use the previously-allocated static RootWindow object
- // later -- on Linux, it holds a reference to our message loop's X connection.
- RootWindow::DeleteInstance();
}
void AuraTestBase::SetUp() {
testing::Test::SetUp();
+ root_window_.reset(new aura::RootWindow);
+ helper_.InitRootWindow(root_window());
helper_.SetUp();
stacking_client_.reset(new TestStackingClient(root_window()));
}
void AuraTestBase::TearDown() {
+ // Flush the message loop because we have pending release tasks
+ // and these tasks if un-executed would upset Valgrind.
+ RunAllPendingInMessageLoop();
+
stacking_client_.reset();
helper_.TearDown();
+ root_window_.reset();
testing::Test::TearDown();
}
void AuraTestBase::RunAllPendingInMessageLoop() {
- helper_.RunAllPendingInMessageLoop(root_window_);
+ helper_.RunAllPendingInMessageLoop(root_window());
}
} // namespace test
« no previous file with comments | « ui/aura/test/aura_test_base.h ('k') | ui/views/test/views_test_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698