| OLD | NEW |
| 1 // Copyright (c) 2012 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 "ui/aura/test/aura_test_helper.h" | 5 #include "ui/aura/test/aura_test_helper.h" |
| 6 | 6 |
| 7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
| 8 #include "base/run_loop.h" | 8 #include "base/run_loop.h" |
| 9 #include "ui/aura/client/aura_constants.h" | 9 #include "ui/aura/client/aura_constants.h" |
| 10 #include "ui/aura/client/default_capture_client.h" | 10 #include "ui/aura/client/default_capture_client.h" |
| 11 #include "ui/aura/client/focus_client.h" | 11 #include "ui/aura/client/focus_client.h" |
| 12 #include "ui/aura/env.h" | 12 #include "ui/aura/env.h" |
| 13 #include "ui/aura/focus_manager.h" | 13 #include "ui/aura/focus_manager.h" |
| 14 #include "ui/aura/root_window.h" | 14 #include "ui/aura/root_window.h" |
| 15 #include "ui/aura/test/test_activation_client.h" | 15 #include "ui/aura/test/test_activation_client.h" |
| 16 #include "ui/aura/test/test_screen.h" | 16 #include "ui/aura/test/test_screen.h" |
| 17 #include "ui/aura/test/test_stacking_client.h" | 17 #include "ui/aura/test/test_stacking_client.h" |
| 18 #include "ui/base/test/dummy_input_method.h" | 18 #include "ui/base/test/dummy_input_method.h" |
| 19 #include "ui/compositor/layer_animator.h" | 19 #include "ui/compositor/layer_animator.h" |
| 20 #include "ui/compositor/scoped_animation_duration_scale_mode.h" | 20 #include "ui/compositor/scoped_animation_duration_scale_mode.h" |
| 21 #include "ui/gfx/screen.h" | 21 #include "ui/gfx/screen.h" |
| 22 | 22 |
| 23 #if defined(USE_X11) | 23 #if defined(USE_X11) |
| 24 #include "ui/base/x/x11_util.h" | 24 #include "ui/base/x/x11_util.h" |
| 25 #endif | 25 #endif |
| 26 | 26 |
| 27 namespace aura { | 27 namespace aura { |
| 28 namespace test { | 28 namespace test { |
| 29 | 29 |
| 30 AuraTestHelper::AuraTestHelper(MessageLoopForUI* message_loop) | 30 AuraTestHelper::AuraTestHelper(base::MessageLoopForUI* message_loop) |
| 31 : setup_called_(false), | 31 : setup_called_(false), |
| 32 teardown_called_(false), | 32 teardown_called_(false), |
| 33 owns_root_window_(false) { | 33 owns_root_window_(false) { |
| 34 DCHECK(message_loop); | 34 DCHECK(message_loop); |
| 35 message_loop_ = message_loop; | 35 message_loop_ = message_loop; |
| 36 // Disable animations during tests. | 36 // Disable animations during tests. |
| 37 zero_duration_mode_.reset(new ui::ScopedAnimationDurationScaleMode( | 37 zero_duration_mode_.reset(new ui::ScopedAnimationDurationScaleMode( |
| 38 ui::ScopedAnimationDurationScaleMode::ZERO_DURATION)); | 38 ui::ScopedAnimationDurationScaleMode::ZERO_DURATION)); |
| 39 } | 39 } |
| 40 | 40 |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 #if !defined(OS_MACOSX) | 90 #if !defined(OS_MACOSX) |
| 91 // TODO(jbates) crbug.com/134753 Find quitters of this RunLoop and have them | 91 // TODO(jbates) crbug.com/134753 Find quitters of this RunLoop and have them |
| 92 // use run_loop.QuitClosure(). | 92 // use run_loop.QuitClosure(). |
| 93 base::RunLoop run_loop(Env::GetInstance()->GetDispatcher()); | 93 base::RunLoop run_loop(Env::GetInstance()->GetDispatcher()); |
| 94 run_loop.RunUntilIdle(); | 94 run_loop.RunUntilIdle(); |
| 95 #endif | 95 #endif |
| 96 } | 96 } |
| 97 | 97 |
| 98 } // namespace test | 98 } // namespace test |
| 99 } // namespace aura | 99 } // namespace aura |
| OLD | NEW |