OLD | NEW |
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/system/power/power_event_observer.h" | 5 #include "ash/system/power/power_event_observer.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "ash/common/test/test_session_state_delegate.h" | |
10 #include "ash/shell.h" | 9 #include "ash/shell.h" |
11 #include "ash/test/ash_test_base.h" | 10 #include "ash/test/ash_test_base.h" |
| 11 #include "ash/test/test_session_state_delegate.h" |
12 #include "base/time/time.h" | 12 #include "base/time/time.h" |
13 #include "chromeos/dbus/dbus_thread_manager.h" | 13 #include "chromeos/dbus/dbus_thread_manager.h" |
14 #include "chromeos/dbus/power_manager_client.h" | 14 #include "chromeos/dbus/power_manager_client.h" |
15 #include "ui/aura/window.h" | 15 #include "ui/aura/window.h" |
16 #include "ui/aura/window_tree_host.h" | 16 #include "ui/aura/window_tree_host.h" |
17 #include "ui/compositor/compositor.h" | 17 #include "ui/compositor/compositor.h" |
18 | 18 |
19 namespace ash { | 19 namespace ash { |
20 | 20 |
21 class PowerEventObserverTest : public test::AshTestBase { | 21 class PowerEventObserverTest : public test::AshTestBase { |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 // request. The real PowerManagerClient would reset its internal counter in | 154 // request. The real PowerManagerClient would reset its internal counter in |
155 // this situation but the stub client is not that smart. | 155 // this situation but the stub client is not that smart. |
156 EXPECT_EQ(2, client->GetNumPendingSuspendReadinessCallbacks()); | 156 EXPECT_EQ(2, client->GetNumPendingSuspendReadinessCallbacks()); |
157 | 157 |
158 observer_->OnLockAnimationsComplete(); | 158 observer_->OnLockAnimationsComplete(); |
159 EXPECT_EQ(1, client->GetNumPendingSuspendReadinessCallbacks()); | 159 EXPECT_EQ(1, client->GetNumPendingSuspendReadinessCallbacks()); |
160 EXPECT_EQ(0, GetNumVisibleCompositors()); | 160 EXPECT_EQ(0, GetNumVisibleCompositors()); |
161 } | 161 } |
162 | 162 |
163 } // namespace ash | 163 } // namespace ash |
OLD | NEW |