OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ash/test/aura_shell_test_base.h" | 5 #include "ash/test/aura_shell_test_base.h" |
6 | 6 |
7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
8 #include "ash/test/test_shell_delegate.h" | 8 #include "ash/test/test_shell_delegate.h" |
9 #include "ui/gfx/compositor/layer_animator.h" | |
10 | 9 |
11 namespace ash { | 10 namespace ash { |
12 namespace test { | 11 namespace test { |
13 | 12 |
14 AuraShellTestBase::AuraShellTestBase() { | 13 AuraShellTestBase::AuraShellTestBase() { |
15 } | 14 } |
16 | 15 |
17 AuraShellTestBase::~AuraShellTestBase() { | 16 AuraShellTestBase::~AuraShellTestBase() { |
18 } | 17 } |
19 | 18 |
20 void AuraShellTestBase::SetUp() { | 19 void AuraShellTestBase::SetUp() { |
21 aura::test::AuraTestBase::SetUp(); | 20 aura::test::AuraTestBase::SetUp(); |
22 | 21 |
23 // Creates Shell and hook with Desktop. | 22 // Creates Shell and hook with Desktop. |
24 ash::Shell::CreateInstance(new TestShellDelegate); | 23 ash::Shell::CreateInstance(new TestShellDelegate); |
25 | |
26 // Disable animations during tests. | |
27 ui::LayerAnimator::set_disable_animations_for_test(true); | |
28 } | 24 } |
29 | 25 |
30 void AuraShellTestBase::TearDown() { | 26 void AuraShellTestBase::TearDown() { |
31 // Flush the message loop to finish pending release tasks. | 27 // Flush the message loop to finish pending release tasks. |
32 RunAllPendingInMessageLoop(); | 28 RunAllPendingInMessageLoop(); |
33 | 29 |
34 // Tear down the shell. | 30 // Tear down the shell. |
35 ash::Shell::DeleteInstance(); | 31 ash::Shell::DeleteInstance(); |
36 | 32 |
37 aura::test::AuraTestBase::TearDown(); | 33 aura::test::AuraTestBase::TearDown(); |
38 } | 34 } |
39 | 35 |
40 } // namespace test | 36 } // namespace test |
41 } // namespace ash | 37 } // namespace ash |
OLD | NEW |