OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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" |
9 | 10 |
10 namespace ash { | 11 namespace ash { |
11 namespace test { | 12 namespace test { |
12 | 13 |
13 AuraShellTestBase::AuraShellTestBase() { | 14 AuraShellTestBase::AuraShellTestBase() { |
14 } | 15 } |
15 | 16 |
16 AuraShellTestBase::~AuraShellTestBase() { | 17 AuraShellTestBase::~AuraShellTestBase() { |
17 } | 18 } |
18 | 19 |
19 void AuraShellTestBase::SetUp() { | 20 void AuraShellTestBase::SetUp() { |
20 aura::test::AuraTestBase::SetUp(); | 21 aura::test::AuraTestBase::SetUp(); |
21 | 22 |
22 // Creates Shell and hook with Desktop. | 23 // Creates Shell and hook with Desktop. |
23 ash::Shell::CreateInstance(new TestShellDelegate); | 24 ash::Shell::CreateInstance(new TestShellDelegate); |
| 25 |
| 26 // Disable animations during tests. |
| 27 ui::LayerAnimator::set_disable_animations_for_test(true); |
24 } | 28 } |
25 | 29 |
26 void AuraShellTestBase::TearDown() { | 30 void AuraShellTestBase::TearDown() { |
27 // Flush the message loop to finish pending release tasks. | 31 // Flush the message loop to finish pending release tasks. |
28 RunAllPendingInMessageLoop(); | 32 RunAllPendingInMessageLoop(); |
29 | 33 |
30 // Tear down the shell. | 34 // Tear down the shell. |
31 ash::Shell::DeleteInstance(); | 35 ash::Shell::DeleteInstance(); |
32 | 36 |
33 aura::test::AuraTestBase::TearDown(); | 37 aura::test::AuraTestBase::TearDown(); |
34 } | 38 } |
35 | 39 |
36 } // namespace test | 40 } // namespace test |
37 } // namespace ash | 41 } // namespace ash |
OLD | NEW |