Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(592)

Side by Side Diff: ui/message_center/notification_list_unittest.cc

Issue 21308002: Update Mac notification tray behavior. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix mac tests. Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
OLDNEW
« no previous file with comments | « ui/message_center/notification_list.cc ('k') | ui/resources/default_100_percent/mac/tray_icon_pressed.png » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698