| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ui/message_center/notification_list.h" | 5 #include "ui/message_center/notification_list.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/i18n/time_formatting.h" | 8 #include "base/i18n/time_formatting.h" |
| 9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 599 EXPECT_TRUE(nr->is_read()); | 599 EXPECT_TRUE(nr->is_read()); |
| 600 } | 600 } |
| 601 | 601 |
| 602 TEST_F(NotificationListTest, QuietMode) { | 602 TEST_F(NotificationListTest, QuietMode) { |
| 603 notification_list()->SetQuietMode(true); | 603 notification_list()->SetQuietMode(true); |
| 604 AddNotification(); | 604 AddNotification(); |
| 605 AddPriorityNotification(HIGH_PRIORITY); | 605 AddPriorityNotification(HIGH_PRIORITY); |
| 606 AddPriorityNotification(MAX_PRIORITY); | 606 AddPriorityNotification(MAX_PRIORITY); |
| 607 EXPECT_EQ(3u, notification_list()->NotificationCount()); | 607 EXPECT_EQ(3u, notification_list()->NotificationCount()); |
| 608 EXPECT_EQ(0u, GetPopupCounts()); | 608 EXPECT_EQ(0u, GetPopupCounts()); |
| 609 // TODO(mukai): fix here when notification_list distinguish dismiss by quiet | |
| 610 // mode and by user operation. | |
| 611 EXPECT_EQ(0u, notification_list()->unread_count()); | |
| 612 | 609 |
| 613 notification_list()->SetQuietMode(false); | 610 notification_list()->SetQuietMode(false); |
| 614 AddNotification(); | 611 AddNotification(); |
| 615 EXPECT_EQ(4u, notification_list()->NotificationCount()); | 612 EXPECT_EQ(4u, notification_list()->NotificationCount()); |
| 616 EXPECT_EQ(1u, GetPopupCounts()); | 613 EXPECT_EQ(1u, GetPopupCounts()); |
| 617 | 614 |
| 618 // TODO(mukai): Add test of quiet mode with expiration. | 615 // TODO(mukai): Add test of quiet mode with expiration. |
| 619 } | 616 } |
| 620 | 617 |
| 621 } // namespace test | 618 } // namespace test |
| 622 } // namespace message_center | 619 } // namespace message_center |
| OLD | NEW |