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/ash_switches.h" | 9 #include "ash/ash_switches.h" |
10 #include "ash/public/cpp/config.h" | 10 #include "ash/public/cpp/config.h" |
11 #include "ash/session/session_controller.h" | 11 #include "ash/session/session_controller.h" |
12 #include "ash/shell.h" | 12 #include "ash/shell.h" |
| 13 #include "ash/shell_port.h" |
13 #include "ash/test/ash_test_base.h" | 14 #include "ash/test/ash_test_base.h" |
14 #include "ash/test/lock_state_controller_test_api.h" | 15 #include "ash/test/lock_state_controller_test_api.h" |
15 #include "ash/test/test_session_controller_client.h" | 16 #include "ash/test/test_session_controller_client.h" |
16 #include "ash/test/test_shell_delegate.h" | 17 #include "ash/test/test_shell_delegate.h" |
17 #include "ash/wm/lock_state_controller.h" | 18 #include "ash/wm/lock_state_controller.h" |
18 #include "ash/wm/maximize_mode/maximize_mode_controller.h" | 19 #include "ash/wm/maximize_mode/maximize_mode_controller.h" |
19 #include "ash/wm/power_button_controller.h" | 20 #include "ash/wm/power_button_controller.h" |
20 #include "ash/wm_shell.h" | |
21 #include "base/command_line.h" | 21 #include "base/command_line.h" |
22 #include "base/compiler_specific.h" | 22 #include "base/compiler_specific.h" |
23 #include "base/memory/ptr_util.h" | 23 #include "base/memory/ptr_util.h" |
24 #include "base/run_loop.h" | 24 #include "base/run_loop.h" |
25 #include "base/test/simple_test_tick_clock.h" | 25 #include "base/test/simple_test_tick_clock.h" |
26 #include "chromeos/dbus/dbus_thread_manager.h" | 26 #include "chromeos/dbus/dbus_thread_manager.h" |
27 #include "chromeos/dbus/fake_power_manager_client.h" | 27 #include "chromeos/dbus/fake_power_manager_client.h" |
28 #include "ui/events/event.h" | 28 #include "ui/events/event.h" |
29 #include "ui/events/test/event_generator.h" | 29 #include "ui/events/test/event_generator.h" |
30 | 30 |
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
479 // Test that after another long duration, backlights should be forced off. | 479 // Test that after another long duration, backlights should be forced off. |
480 tick_clock_->Advance(base::TimeDelta::FromMilliseconds(800)); | 480 tick_clock_->Advance(base::TimeDelta::FromMilliseconds(800)); |
481 power_manager_client_->SendPowerButtonEvent(true, tick_clock_->NowTicks()); | 481 power_manager_client_->SendPowerButtonEvent(true, tick_clock_->NowTicks()); |
482 power_manager_client_->SendPowerButtonEvent(false, tick_clock_->NowTicks()); | 482 power_manager_client_->SendPowerButtonEvent(false, tick_clock_->NowTicks()); |
483 power_manager_client_->SendBrightnessChanged(0, false); | 483 power_manager_client_->SendBrightnessChanged(0, false); |
484 EXPECT_TRUE(GetBacklightsForcedOff()); | 484 EXPECT_TRUE(GetBacklightsForcedOff()); |
485 } | 485 } |
486 | 486 |
487 } // namespace test | 487 } // namespace test |
488 } // namespace ash | 488 } // namespace ash |
OLD | NEW |