Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(349)

Side by Side Diff: ash/wm/lock_state_controller_unittest.cc

Issue 192483007: Move chromeos/display/* to ui/display/chromeos (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Include display.gyp into ChromeOS builds only Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ash/touch/touch_observer_hud.cc ('k') | ash/wm/power_button_controller.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_state_delegate.h" 8 #include "ash/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_shell_delegate.h" 12 #include "ash/test/test_shell_delegate.h"
13 #include "ash/wm/power_button_controller.h" 13 #include "ash/wm/power_button_controller.h"
14 #include "ash/wm/session_state_animator.h" 14 #include "ash/wm/session_state_animator.h"
15 #include "base/command_line.h" 15 #include "base/command_line.h"
16 #include "base/memory/scoped_ptr.h" 16 #include "base/memory/scoped_ptr.h"
17 #include "base/time/time.h" 17 #include "base/time/time.h"
18 #include "ui/aura/env.h" 18 #include "ui/aura/env.h"
19 #include "ui/aura/test/event_generator.h" 19 #include "ui/aura/test/event_generator.h"
20 #include "ui/aura/test/test_window_delegate.h" 20 #include "ui/aura/test/test_window_delegate.h"
21 #include "ui/aura/window_event_dispatcher.h" 21 #include "ui/aura/window_event_dispatcher.h"
22 #include "ui/compositor/layer_animator.h" 22 #include "ui/compositor/layer_animator.h"
23 #include "ui/compositor/scoped_animation_duration_scale_mode.h" 23 #include "ui/compositor/scoped_animation_duration_scale_mode.h"
24 #include "ui/compositor/scoped_layer_animation_settings.h" 24 #include "ui/compositor/scoped_layer_animation_settings.h"
25 #include "ui/gfx/rect.h" 25 #include "ui/gfx/rect.h"
26 #include "ui/gfx/size.h" 26 #include "ui/gfx/size.h"
27 27
28 #if defined(OS_CHROMEOS) && defined(USE_X11) 28 #if defined(OS_CHROMEOS) && defined(USE_X11)
29 #include "chromeos/display/output_configurator.h" 29 #include "ui/display/chromeos/output_configurator.h"
30 #include "ui/display/display_constants.h" 30 #include "ui/display/display_constants.h"
31 #endif 31 #endif
32 32
33 #if defined(OS_WIN) 33 #if defined(OS_WIN)
34 #include "base/win/windows_version.h" 34 #include "base/win/windows_version.h"
35 #endif 35 #endif
36 36
37 namespace ash { 37 namespace ash {
38 38
39 using internal::SessionStateAnimator; 39 using internal::SessionStateAnimator;
(...skipping 952 matching lines...) Expand 10 before | Expand all | Expand 10 after
992 // usual. 992 // usual.
993 controller_->OnScreenBrightnessChanged(10.0); 993 controller_->OnScreenBrightnessChanged(10.0);
994 PressPowerButton(); 994 PressPowerButton();
995 EXPECT_TRUE(test_api_->is_animating_lock()); 995 EXPECT_TRUE(test_api_->is_animating_lock());
996 ReleasePowerButton(); 996 ReleasePowerButton();
997 } 997 }
998 998
999 #if defined(OS_CHROMEOS) && defined(USE_X11) 999 #if defined(OS_CHROMEOS) && defined(USE_X11)
1000 TEST_F(LockStateControllerTest, HonorPowerButtonInDockedMode) { 1000 TEST_F(LockStateControllerTest, HonorPowerButtonInDockedMode) {
1001 // Create two outputs, the first internal and the second external. 1001 // Create two outputs, the first internal and the second external.
1002 std::vector<chromeos::OutputConfigurator::OutputSnapshot> outputs; 1002 std::vector<ui::OutputConfigurator::OutputSnapshot> outputs;
1003 chromeos::OutputConfigurator::OutputSnapshot internal_output; 1003 ui::OutputConfigurator::OutputSnapshot internal_output;
1004 internal_output.type = ui::OUTPUT_TYPE_INTERNAL; 1004 internal_output.type = ui::OUTPUT_TYPE_INTERNAL;
1005 outputs.push_back(internal_output); 1005 outputs.push_back(internal_output);
1006 chromeos::OutputConfigurator::OutputSnapshot external_output; 1006 ui::OutputConfigurator::OutputSnapshot external_output;
1007 external_output.type = ui::OUTPUT_TYPE_HDMI; 1007 external_output.type = ui::OUTPUT_TYPE_HDMI;
1008 outputs.push_back(external_output); 1008 outputs.push_back(external_output);
1009 1009
1010 // When all of the displays are turned off (e.g. due to user inactivity), the 1010 // When all of the displays are turned off (e.g. due to user inactivity), the
1011 // power button should be ignored. 1011 // power button should be ignored.
1012 controller_->OnScreenBrightnessChanged(0.0); 1012 controller_->OnScreenBrightnessChanged(0.0);
1013 outputs[0].current_mode = 0; 1013 outputs[0].current_mode = 0;
1014 outputs[1].current_mode = 0; 1014 outputs[1].current_mode = 0;
1015 controller_->OnDisplayModeChanged(outputs); 1015 controller_->OnDisplayModeChanged(outputs);
1016 PressPowerButton(); 1016 PressPowerButton();
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
1102 1102
1103 Advance(SessionStateAnimator::ANIMATION_SPEED_MOVE_WINDOWS); 1103 Advance(SessionStateAnimator::ANIMATION_SPEED_MOVE_WINDOWS);
1104 ExpectUnlockAfterUIDestroyedAnimationFinished(); 1104 ExpectUnlockAfterUIDestroyedAnimationFinished();
1105 EXPECT_TRUE(IsBackgroundHidden()); 1105 EXPECT_TRUE(IsBackgroundHidden());
1106 1106
1107 ExpectUnlockedState(); 1107 ExpectUnlockedState();
1108 } 1108 }
1109 1109
1110 } // namespace test 1110 } // namespace test
1111 } // namespace ash 1111 } // namespace ash
OLDNEW
« no previous file with comments | « ash/touch/touch_observer_hud.cc ('k') | ash/wm/power_button_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698