| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/system/power/tablet_power_button_controller.h" | 5 #include "ash/system/power/tablet_power_button_controller.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "ash/common/ash_switches.h" | 9 #include "ash/ash_switches.h" |
| 10 #include "ash/common/session/session_state_delegate.h" | 10 #include "ash/session/session_state_delegate.h" |
| 11 #include "ash/common/wm/maximize_mode/maximize_mode_controller.h" | |
| 12 #include "ash/common/wm_shell.h" | |
| 13 #include "ash/shell.h" | 11 #include "ash/shell.h" |
| 14 #include "ash/test/ash_test_base.h" | 12 #include "ash/test/ash_test_base.h" |
| 15 #include "ash/test/lock_state_controller_test_api.h" | 13 #include "ash/test/lock_state_controller_test_api.h" |
| 16 #include "ash/test/test_shell_delegate.h" | 14 #include "ash/test/test_shell_delegate.h" |
| 17 #include "ash/wm/lock_state_controller.h" | 15 #include "ash/wm/lock_state_controller.h" |
| 16 #include "ash/wm/maximize_mode/maximize_mode_controller.h" |
| 18 #include "ash/wm/power_button_controller.h" | 17 #include "ash/wm/power_button_controller.h" |
| 18 #include "ash/wm_shell.h" |
| 19 #include "base/command_line.h" | 19 #include "base/command_line.h" |
| 20 #include "base/compiler_specific.h" | 20 #include "base/compiler_specific.h" |
| 21 #include "base/memory/ptr_util.h" | 21 #include "base/memory/ptr_util.h" |
| 22 #include "base/run_loop.h" | 22 #include "base/run_loop.h" |
| 23 #include "base/test/simple_test_tick_clock.h" | 23 #include "base/test/simple_test_tick_clock.h" |
| 24 #include "chromeos/dbus/dbus_thread_manager.h" | 24 #include "chromeos/dbus/dbus_thread_manager.h" |
| 25 #include "chromeos/dbus/fake_power_manager_client.h" | 25 #include "chromeos/dbus/fake_power_manager_client.h" |
| 26 #include "ui/events/event.h" | 26 #include "ui/events/event.h" |
| 27 #include "ui/events/test/event_generator.h" | 27 #include "ui/events/test/event_generator.h" |
| 28 | 28 |
| (...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 472 // Test that after another long duration, backlights should be forced off. | 472 // Test that after another long duration, backlights should be forced off. |
| 473 tick_clock_->Advance(base::TimeDelta::FromMilliseconds(800)); | 473 tick_clock_->Advance(base::TimeDelta::FromMilliseconds(800)); |
| 474 power_manager_client_->SendPowerButtonEvent(true, tick_clock_->NowTicks()); | 474 power_manager_client_->SendPowerButtonEvent(true, tick_clock_->NowTicks()); |
| 475 power_manager_client_->SendPowerButtonEvent(false, tick_clock_->NowTicks()); | 475 power_manager_client_->SendPowerButtonEvent(false, tick_clock_->NowTicks()); |
| 476 power_manager_client_->SendBrightnessChanged(0, false); | 476 power_manager_client_->SendBrightnessChanged(0, false); |
| 477 EXPECT_TRUE(GetBacklightsForcedOff()); | 477 EXPECT_TRUE(GetBacklightsForcedOff()); |
| 478 } | 478 } |
| 479 | 479 |
| 480 } // namespace test | 480 } // namespace test |
| 481 } // namespace ash | 481 } // namespace ash |
| OLD | NEW |