| 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");
|
|
|