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

Unified Diff: ash/test/ash_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 | « ash/shell/shell_main.cc ('k') | chrome/browser/chrome_browser_main_extra_parts_aura.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/test/ash_test_base.cc
===================================================================
--- ash/test/ash_test_base.cc (revision 124527)
+++ ash/test/ash_test_base.cc (working copy)
@@ -13,18 +13,12 @@
namespace test {
AshTestBase::AshTestBase() {
- helper_.InitRootWindow(Shell::GetRootWindow());
}
AshTestBase::~AshTestBase() {
- // 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.
- aura::RootWindow::DeleteInstance();
}
void AshTestBase::SetUp() {
- helper_.SetUp();
-
// Creates Shell and hook with Desktop.
TestShellDelegate* delegate = new TestShellDelegate;
Shell::WindowMode window_mode = Shell::MODE_OVERLAPPING;
@@ -32,6 +26,9 @@
delegate->SetOverrideWindowMode(window_mode);
ash::Shell::CreateInstance(delegate);
+ helper_.SetUp();
+ helper_.InitRootWindow(Shell::GetRootWindow());
+
// Disable animations during tests.
ui::LayerAnimator::set_disable_animations_for_test(true);
}
@@ -40,10 +37,10 @@
// Flush the message loop to finish pending release tasks.
RunAllPendingInMessageLoop();
+ helper_.TearDown();
+
// Tear down the shell.
Shell::DeleteInstance();
-
- helper_.TearDown();
}
bool AshTestBase::GetOverrideWindowMode(Shell::WindowMode* window_mode) {
« no previous file with comments | « ash/shell/shell_main.cc ('k') | chrome/browser/chrome_browser_main_extra_parts_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698