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/shell.h" | 5 #include "ash/shell.h" |
6 #include "ash/system/system_notifier.h" | 6 #include "ash/system/system_notifier.h" |
7 #include "ash/test/ash_test_base.h" | 7 #include "ash/test/ash_test_base.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/macros.h" |
9 #include "chrome/browser/notifications/login_state_notification_blocker_chromeos
.h" | 10 #include "chrome/browser/notifications/login_state_notification_blocker_chromeos
.h" |
10 #include "chromeos/login/login_state.h" | 11 #include "chromeos/login/login_state.h" |
11 #include "ui/message_center/message_center.h" | 12 #include "ui/message_center/message_center.h" |
12 #include "ui/message_center/notification.h" | 13 #include "ui/message_center/notification.h" |
13 | 14 |
14 class LoginStateNotificationBlockerChromeOSTest | 15 class LoginStateNotificationBlockerChromeOSTest |
15 : public ash::test::AshTestBase, | 16 : public ash::test::AshTestBase, |
16 public message_center::NotificationBlocker::Observer { | 17 public message_center::NotificationBlocker::Observer { |
17 public: | 18 public: |
18 LoginStateNotificationBlockerChromeOSTest() | 19 LoginStateNotificationBlockerChromeOSTest() |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 // Lock. | 118 // Lock. |
118 ash::Shell::GetInstance()->OnLockStateChanged(true); | 119 ash::Shell::GetInstance()->OnLockStateChanged(true); |
119 EXPECT_EQ(1, GetStateChangedCountAndReset()); | 120 EXPECT_EQ(1, GetStateChangedCountAndReset()); |
120 EXPECT_TRUE(ShouldShowNotificationAsPopup(notifier_id)); | 121 EXPECT_TRUE(ShouldShowNotificationAsPopup(notifier_id)); |
121 | 122 |
122 // Unlock. | 123 // Unlock. |
123 ash::Shell::GetInstance()->OnLockStateChanged(false); | 124 ash::Shell::GetInstance()->OnLockStateChanged(false); |
124 EXPECT_EQ(1, GetStateChangedCountAndReset()); | 125 EXPECT_EQ(1, GetStateChangedCountAndReset()); |
125 EXPECT_TRUE(ShouldShowNotificationAsPopup(notifier_id)); | 126 EXPECT_TRUE(ShouldShowNotificationAsPopup(notifier_id)); |
126 } | 127 } |
OLD | NEW |