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

Unified Diff: ui/message_center/notification_list_unittest.cc

Issue 15582004: Move NotificationDelegate into message_center. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Win browsertests. Created 7 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: ui/message_center/notification_list_unittest.cc
diff --git a/ui/message_center/notification_list_unittest.cc b/ui/message_center/notification_list_unittest.cc
index 87b7c6a42d24fbd7732d4e025f8782220244afbf..48bd3d47891f851357c8076452a7a643bc6e98b6 100644
--- a/ui/message_center/notification_list_unittest.cc
+++ b/ui/message_center/notification_list_unittest.cc
@@ -33,11 +33,14 @@ class NotificationListTest : public testing::Test {
std::string AddNotification(const base::DictionaryValue* optional_fields) {
std::string new_id = base::StringPrintf(kIdFormat, counter_);
notification_list_->AddNotification(
- message_center::NOTIFICATION_TYPE_SIMPLE, new_id,
+ message_center::NOTIFICATION_TYPE_SIMPLE,
+ new_id,
UTF8ToUTF16(base::StringPrintf(kTitleFormat, counter_)),
UTF8ToUTF16(base::StringPrintf(kMessageFormat, counter_)),
- UTF8ToUTF16(kDisplaySource), kExtensionId,
- optional_fields);
+ UTF8ToUTF16(kDisplaySource),
+ kExtensionId,
+ optional_fields,
+ NULL);
counter_++;
return new_id;
}
@@ -172,18 +175,38 @@ TEST_F(NotificationListTest, UpdateNotification) {
}
TEST_F(NotificationListTest, GetNotificationsBySourceOrExtensions) {
- notification_list()->AddNotification(
- message_center::NOTIFICATION_TYPE_SIMPLE, "id0", UTF8ToUTF16("title0"),
- UTF8ToUTF16("message0"), UTF8ToUTF16("source0"), "ext0", NULL);
- notification_list()->AddNotification(
- message_center::NOTIFICATION_TYPE_SIMPLE, "id1", UTF8ToUTF16("title1"),
- UTF8ToUTF16("message1"), UTF8ToUTF16("source0"), "ext0", NULL);
- notification_list()->AddNotification(
- message_center::NOTIFICATION_TYPE_SIMPLE, "id2", UTF8ToUTF16("title1"),
- UTF8ToUTF16("message1"), UTF8ToUTF16("source1"), "ext0", NULL);
- notification_list()->AddNotification(
- message_center::NOTIFICATION_TYPE_SIMPLE, "id3", UTF8ToUTF16("title1"),
- UTF8ToUTF16("message1"), UTF8ToUTF16("source2"), "ext1", NULL);
+ notification_list()->AddNotification(message_center::NOTIFICATION_TYPE_SIMPLE,
+ "id0",
+ UTF8ToUTF16("title0"),
+ UTF8ToUTF16("message0"),
+ UTF8ToUTF16("source0"),
+ "ext0",
+ NULL,
+ NULL);
+ notification_list()->AddNotification(message_center::NOTIFICATION_TYPE_SIMPLE,
+ "id1",
+ UTF8ToUTF16("title1"),
+ UTF8ToUTF16("message1"),
+ UTF8ToUTF16("source0"),
+ "ext0",
+ NULL,
+ NULL);
+ notification_list()->AddNotification(message_center::NOTIFICATION_TYPE_SIMPLE,
+ "id2",
+ UTF8ToUTF16("title1"),
+ UTF8ToUTF16("message1"),
+ UTF8ToUTF16("source1"),
+ "ext0",
+ NULL,
+ NULL);
+ notification_list()->AddNotification(message_center::NOTIFICATION_TYPE_SIMPLE,
+ "id3",
+ UTF8ToUTF16("title1"),
+ UTF8ToUTF16("message1"),
+ UTF8ToUTF16("source2"),
+ "ext1",
+ NULL,
+ NULL);
NotificationList::Notifications by_source =
notification_list()->GetNotificationsBySource("id0");

Powered by Google App Engine
This is Rietveld 408576698