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

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

Issue 2613493002: Fix namespace for src/ui/display/. (Closed)
Patch Set: Rebase. Created 3 years, 11 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
« 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 <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "ash/common/session/session_state_delegate.h" 10 #include "ash/common/session/session_state_delegate.h"
(...skipping 884 matching lines...) Expand 10 before | Expand all | Expand 10 after
895 // After increasing the brightness to 10%, we should start the timer like 895 // After increasing the brightness to 10%, we should start the timer like
896 // usual. 896 // usual.
897 power_button_controller_->OnScreenBrightnessChanged(10.0); 897 power_button_controller_->OnScreenBrightnessChanged(10.0);
898 PressPowerButton(); 898 PressPowerButton();
899 EXPECT_TRUE(test_api_->is_animating_lock()); 899 EXPECT_TRUE(test_api_->is_animating_lock());
900 ReleasePowerButton(); 900 ReleasePowerButton();
901 } 901 }
902 902
903 TEST_F(LockStateControllerTest, HonorPowerButtonInDockedMode) { 903 TEST_F(LockStateControllerTest, HonorPowerButtonInDockedMode) {
904 // Create two outputs, the first internal and the second external. 904 // Create two outputs, the first internal and the second external.
905 ui::DisplayConfigurator::DisplayStateList outputs; 905 display::DisplayConfigurator::DisplayStateList outputs;
906 906
907 std::unique_ptr<ui::DisplaySnapshot> internal_display = 907 std::unique_ptr<display::DisplaySnapshot> internal_display =
908 display::FakeDisplaySnapshot::Builder() 908 display::FakeDisplaySnapshot::Builder()
909 .SetId(123) 909 .SetId(123)
910 .SetNativeMode(gfx::Size(1, 1)) 910 .SetNativeMode(gfx::Size(1, 1))
911 .SetType(ui::DISPLAY_CONNECTION_TYPE_INTERNAL) 911 .SetType(display::DISPLAY_CONNECTION_TYPE_INTERNAL)
912 .Build(); 912 .Build();
913 outputs.push_back(internal_display.get()); 913 outputs.push_back(internal_display.get());
914 914
915 std::unique_ptr<ui::DisplaySnapshot> external_display = 915 std::unique_ptr<display::DisplaySnapshot> external_display =
916 display::FakeDisplaySnapshot::Builder() 916 display::FakeDisplaySnapshot::Builder()
917 .SetId(456) 917 .SetId(456)
918 .SetNativeMode(gfx::Size(1, 1)) 918 .SetNativeMode(gfx::Size(1, 1))
919 .SetType(ui::DISPLAY_CONNECTION_TYPE_HDMI) 919 .SetType(display::DISPLAY_CONNECTION_TYPE_HDMI)
920 .Build(); 920 .Build();
921 outputs.push_back(external_display.get()); 921 outputs.push_back(external_display.get());
922 922
923 // When all of the displays are turned off (e.g. due to user inactivity), the 923 // When all of the displays are turned off (e.g. due to user inactivity), the
924 // power button should be ignored. 924 // power button should be ignored.
925 power_button_controller_->OnScreenBrightnessChanged(0.0); 925 power_button_controller_->OnScreenBrightnessChanged(0.0);
926 internal_display->set_current_mode(nullptr); 926 internal_display->set_current_mode(nullptr);
927 external_display->set_current_mode(nullptr); 927 external_display->set_current_mode(nullptr);
928 power_button_controller_->OnDisplayModeChanged(outputs); 928 power_button_controller_->OnDisplayModeChanged(outputs);
929 PressPowerButton(); 929 PressPowerButton();
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
1063 ASSERT_EQ(0, delegate->handle_take_screenshot_count()); 1063 ASSERT_EQ(0, delegate->handle_take_screenshot_count());
1064 PressVolumeDown(); 1064 PressVolumeDown();
1065 PressPowerButton(); 1065 PressPowerButton();
1066 ReleasePowerButton(); 1066 ReleasePowerButton();
1067 ReleaseVolumeDown(); 1067 ReleaseVolumeDown();
1068 EXPECT_EQ(1, delegate->handle_take_screenshot_count()); 1068 EXPECT_EQ(1, delegate->handle_take_screenshot_count());
1069 } 1069 }
1070 1070
1071 } // namespace test 1071 } // namespace test
1072 } // namespace ash 1072 } // 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