Chromium Code Reviews| Index: ash/wm/lock_state_controller_unittest.cc |
| diff --git a/ash/wm/lock_state_controller_unittest.cc b/ash/wm/lock_state_controller_unittest.cc |
| index 31db4072b9f2f23b27338e5e34c036deef45e3e4..8b87c3d0cdd7039e4fc4130ac259c4ce00ef854c 100644 |
| --- a/ash/wm/lock_state_controller_unittest.cc |
| +++ b/ash/wm/lock_state_controller_unittest.cc |
| @@ -907,27 +907,21 @@ TEST_F(LockStateControllerTest, HonorPowerButtonInDockedMode) { |
| // Create two outputs, the first internal and the second external. |
| ui::DisplayConfigurator::DisplayStateList outputs; |
| - ui::DisplayConfigurator::DisplayState internal_output; |
| ui::TestDisplaySnapshot internal_display; |
| internal_display.set_type(ui::DISPLAY_CONNECTION_TYPE_INTERNAL); |
| internal_display.set_modes(modes.get()); |
| - internal_output.display = &internal_display; |
| - outputs.push_back(internal_output); |
| + outputs.push_back(&internal_display); |
| - ui::DisplayConfigurator::DisplayState external_output; |
| ui::TestDisplaySnapshot external_display; |
| external_display.set_type(ui::DISPLAY_CONNECTION_TYPE_HDMI); |
| external_display.set_modes(modes.get()); |
| - external_output.display = &external_display; |
| - outputs.push_back(external_output); |
| + outputs.push_back(&external_display); |
| // When all of the displays are turned off (e.g. due to user inactivity), the |
| // power button should be ignored. |
| power_button_controller_->OnScreenBrightnessChanged(0.0); |
| - static_cast<ui::TestDisplaySnapshot*>(outputs[0].display) |
| - ->set_current_mode(NULL); |
| - static_cast<ui::TestDisplaySnapshot*>(outputs[1].display) |
| - ->set_current_mode(NULL); |
| + internal_display.set_current_mode(NULL); |
| + external_display.set_current_mode(NULL); |
|
oshima
2015/03/18 23:02:45
nullptr
dnicoara
2015/03/19 14:47:36
Done.
|
| power_button_controller_->OnDisplayModeChanged(outputs); |
| PressPowerButton(); |
| EXPECT_FALSE(test_api_->is_animating_lock()); |
| @@ -936,8 +930,7 @@ TEST_F(LockStateControllerTest, HonorPowerButtonInDockedMode) { |
| // When the screen brightness is 0% but the external display is still turned |
| // on (indicating either docked mode or the user having manually decreased the |
| // brightness to 0%), the power button should still be handled. |
| - static_cast<ui::TestDisplaySnapshot*>(outputs[1].display) |
| - ->set_current_mode(modes[0]); |
| + external_display.set_current_mode(modes[0]); |
| power_button_controller_->OnDisplayModeChanged(outputs); |
| PressPowerButton(); |
| EXPECT_TRUE(test_api_->is_animating_lock()); |