| 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
|
|
|