OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/wm/lock_state_controller.h" | 5 #include "ash/wm/lock_state_controller.h" |
6 | 6 |
7 #include "ash/ash_switches.h" | 7 #include "ash/ash_switches.h" |
8 #include "ash/session/session_state_delegate.h" | 8 #include "ash/session/session_state_delegate.h" |
9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
10 #include "ash/shell_window_ids.h" | 10 #include "ash/shell_window_ids.h" |
11 #include "ash/test/ash_test_base.h" | 11 #include "ash/test/ash_test_base.h" |
12 #include "ash/test/test_lock_state_controller_delegate.h" | 12 #include "ash/test/test_lock_state_controller_delegate.h" |
13 #include "ash/test/test_shell_delegate.h" | 13 #include "ash/test/test_shell_delegate.h" |
14 #include "ash/wm/power_button_controller.h" | 14 #include "ash/wm/power_button_controller.h" |
15 #include "ash/wm/session_state_animator.h" | 15 #include "ash/wm/session_state_animator.h" |
16 #include "base/command_line.h" | 16 #include "base/command_line.h" |
17 #include "base/memory/scoped_ptr.h" | 17 #include "base/memory/scoped_ptr.h" |
18 #include "base/time/time.h" | 18 #include "base/time/time.h" |
19 #include "ui/aura/env.h" | 19 #include "ui/aura/env.h" |
20 #include "ui/aura/test/event_generator.h" | |
21 #include "ui/aura/test/test_window_delegate.h" | 20 #include "ui/aura/test/test_window_delegate.h" |
22 #include "ui/aura/window_event_dispatcher.h" | 21 #include "ui/aura/window_event_dispatcher.h" |
23 #include "ui/compositor/layer_animator.h" | 22 #include "ui/compositor/layer_animator.h" |
24 #include "ui/compositor/scoped_animation_duration_scale_mode.h" | 23 #include "ui/compositor/scoped_animation_duration_scale_mode.h" |
25 #include "ui/compositor/scoped_layer_animation_settings.h" | 24 #include "ui/compositor/scoped_layer_animation_settings.h" |
| 25 #include "ui/events/test/event_generator.h" |
26 #include "ui/gfx/rect.h" | 26 #include "ui/gfx/rect.h" |
27 #include "ui/gfx/size.h" | 27 #include "ui/gfx/size.h" |
28 | 28 |
29 #if defined(OS_CHROMEOS) | 29 #if defined(OS_CHROMEOS) |
30 #include "ui/display/chromeos/display_configurator.h" | 30 #include "ui/display/chromeos/display_configurator.h" |
31 #include "ui/display/chromeos/test/test_display_snapshot.h" | 31 #include "ui/display/chromeos/test/test_display_snapshot.h" |
32 #include "ui/display/types/display_constants.h" | 32 #include "ui/display/types/display_constants.h" |
33 #endif | 33 #endif |
34 | 34 |
35 #if defined(OS_WIN) | 35 #if defined(OS_WIN) |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 | 106 |
107 virtual void TearDown() { | 107 virtual void TearDown() { |
108 // TODO(antrim) : restore | 108 // TODO(antrim) : restore |
109 // animator_helper_->AdvanceUntilDone(); | 109 // animator_helper_->AdvanceUntilDone(); |
110 window_.reset(); | 110 window_.reset(); |
111 AshTestBase::TearDown(); | 111 AshTestBase::TearDown(); |
112 } | 112 } |
113 | 113 |
114 protected: | 114 protected: |
115 void GenerateMouseMoveEvent() { | 115 void GenerateMouseMoveEvent() { |
116 aura::test::EventGenerator generator( | 116 ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow()); |
117 Shell::GetPrimaryRootWindow()); | |
118 generator.MoveMouseTo(10, 10); | 117 generator.MoveMouseTo(10, 10); |
119 } | 118 } |
120 | 119 |
121 int NumShutdownRequests() { | 120 int NumShutdownRequests() { |
122 return delegate_->num_shutdown_requests() + | 121 return delegate_->num_shutdown_requests() + |
123 shell_delegate_->num_exit_requests(); | 122 shell_delegate_->num_exit_requests(); |
124 } | 123 } |
125 | 124 |
126 void Advance(SessionStateAnimator::AnimationSpeed speed) { | 125 void Advance(SessionStateAnimator::AnimationSpeed speed) { |
127 // TODO (antrim) : restore | 126 // TODO (antrim) : restore |
(...skipping 957 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1085 | 1084 |
1086 Advance(SessionStateAnimator::ANIMATION_SPEED_MOVE_WINDOWS); | 1085 Advance(SessionStateAnimator::ANIMATION_SPEED_MOVE_WINDOWS); |
1087 ExpectUnlockAfterUIDestroyedAnimationFinished(); | 1086 ExpectUnlockAfterUIDestroyedAnimationFinished(); |
1088 EXPECT_TRUE(IsBackgroundHidden()); | 1087 EXPECT_TRUE(IsBackgroundHidden()); |
1089 | 1088 |
1090 ExpectUnlockedState(); | 1089 ExpectUnlockedState(); |
1091 } | 1090 } |
1092 | 1091 |
1093 } // namespace test | 1092 } // namespace test |
1094 } // namespace ash | 1093 } // namespace ash |
OLD | NEW |