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

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

Issue 226183004: Renamed OutputConfigurator to DisplayConfigurator (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 6 years, 8 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) 28 #if defined(OS_CHROMEOS)
29 #include "ui/display/chromeos/output_configurator.h" 29 #include "ui/display/chromeos/display_configurator.h"
30 #include "ui/display/chromeos/test/test_display_snapshot.h" 30 #include "ui/display/chromeos/test/test_display_snapshot.h"
31 #include "ui/display/display_constants.h" 31 #include "ui/display/display_constants.h"
32 #endif 32 #endif
33 33
34 #if defined(OS_WIN) 34 #if defined(OS_WIN)
35 #include "base/win/windows_version.h" 35 #include "base/win/windows_version.h"
36 #endif 36 #endif
37 37
38 namespace ash { 38 namespace ash {
39 namespace test { 39 namespace test {
(...skipping 950 matching lines...) Expand 10 before | Expand all | Expand 10 after
990 EXPECT_TRUE(test_api_->is_animating_lock()); 990 EXPECT_TRUE(test_api_->is_animating_lock());
991 ReleasePowerButton(); 991 ReleasePowerButton();
992 } 992 }
993 993
994 #if defined(OS_CHROMEOS) && defined(USE_X11) 994 #if defined(OS_CHROMEOS) && defined(USE_X11)
995 TEST_F(LockStateControllerTest, HonorPowerButtonInDockedMode) { 995 TEST_F(LockStateControllerTest, HonorPowerButtonInDockedMode) {
996 ScopedVector<const ui::DisplayMode> modes; 996 ScopedVector<const ui::DisplayMode> modes;
997 modes.push_back(new ui::DisplayMode(gfx::Size(1, 1), false, 60.0f)); 997 modes.push_back(new ui::DisplayMode(gfx::Size(1, 1), false, 60.0f));
998 998
999 // Create two outputs, the first internal and the second external. 999 // Create two outputs, the first internal and the second external.
1000 ui::OutputConfigurator::DisplayStateList outputs; 1000 ui::DisplayConfigurator::DisplayStateList outputs;
1001 ui::OutputConfigurator::DisplayState internal_output; 1001 ui::DisplayConfigurator::DisplayState internal_output;
1002 ui::TestDisplaySnapshot internal_display; 1002 ui::TestDisplaySnapshot internal_display;
1003 internal_display.set_type(ui::OUTPUT_TYPE_INTERNAL); 1003 internal_display.set_type(ui::OUTPUT_TYPE_INTERNAL);
1004 internal_display.set_modes(modes.get()); 1004 internal_display.set_modes(modes.get());
1005 internal_output.display = &internal_display; 1005 internal_output.display = &internal_display;
1006 outputs.push_back(internal_output); 1006 outputs.push_back(internal_output);
1007 1007
1008 ui::OutputConfigurator::DisplayState external_output; 1008 ui::DisplayConfigurator::DisplayState external_output;
1009 ui::TestDisplaySnapshot external_display; 1009 ui::TestDisplaySnapshot external_display;
1010 external_display.set_type(ui::OUTPUT_TYPE_HDMI); 1010 external_display.set_type(ui::OUTPUT_TYPE_HDMI);
1011 external_display.set_modes(modes.get()); 1011 external_display.set_modes(modes.get());
1012 external_output.display = &external_display; 1012 external_output.display = &external_display;
1013 outputs.push_back(external_output); 1013 outputs.push_back(external_output);
1014 1014
1015 // When all of the displays are turned off (e.g. due to user inactivity), the 1015 // When all of the displays are turned off (e.g. due to user inactivity), the
1016 // power button should be ignored. 1016 // power button should be ignored.
1017 controller_->OnScreenBrightnessChanged(0.0); 1017 controller_->OnScreenBrightnessChanged(0.0);
1018 static_cast<ui::TestDisplaySnapshot*>(outputs[0].display) 1018 static_cast<ui::TestDisplaySnapshot*>(outputs[0].display)
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
1110 1110
1111 Advance(SessionStateAnimator::ANIMATION_SPEED_MOVE_WINDOWS); 1111 Advance(SessionStateAnimator::ANIMATION_SPEED_MOVE_WINDOWS);
1112 ExpectUnlockAfterUIDestroyedAnimationFinished(); 1112 ExpectUnlockAfterUIDestroyedAnimationFinished();
1113 EXPECT_TRUE(IsBackgroundHidden()); 1113 EXPECT_TRUE(IsBackgroundHidden());
1114 1114
1115 ExpectUnlockedState(); 1115 ExpectUnlockedState();
1116 } 1116 }
1117 1117
1118 } // namespace test 1118 } // namespace test
1119 } // namespace ash 1119 } // 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