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