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

Unified Diff: ui/message_center/cocoa/notification_controller_unittest.mm

Issue 1292003004: Elide origins displayed on web notifications. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
Index: ui/message_center/cocoa/notification_controller_unittest.mm
diff --git a/ui/message_center/cocoa/notification_controller_unittest.mm b/ui/message_center/cocoa/notification_controller_unittest.mm
index 41573e1528c0199da328a21ce04e5f0ecd13f9a3..95662266e42a386b8e329d3bb799ad874471d7cc 100644
--- a/ui/message_center/cocoa/notification_controller_unittest.mm
+++ b/ui/message_center/cocoa/notification_controller_unittest.mm
@@ -302,7 +302,8 @@ TEST_F(NotificationControllerTest, List) {
UTF8ToUTF16(""), // Test for empty string.
UTF8ToUTF16(" ")); // Test for string containing only spaces.
optional.items.push_back(item3);
- optional.context_message = UTF8ToUTF16("Context Message");
+ optional.context_message.message = "Context Message";
+ optional.context_message.is_origin = false;
scoped_ptr<message_center::Notification> notification(
new message_center::Notification(
@@ -333,7 +334,8 @@ TEST_F(NotificationControllerTest, List) {
TEST_F(NotificationControllerTest, NoMessage) {
message_center::RichNotificationData optional;
- optional.context_message = UTF8ToUTF16("Context Message");
+ optional.context_message.message = "Context Message";
+ optional.context_message.is_origin = false;
scoped_ptr<message_center::Notification> notification(
new message_center::Notification(
@@ -422,7 +424,7 @@ TEST_F(NotificationControllerTest, MessageSize) {
EXPECT_EQ(1u, compute_message_lines());
// Same as above, but context message takes away from message lines.
- notification->set_context_message(base::UTF8ToUTF16("foo"));
+ notification->set_context_message("foo", false);
notification->set_title(ASCIIToUTF16(""));
[controller updateNotification:notification.get()];
EXPECT_EQ(1u, compute_message_lines());

Powered by Google App Engine
This is Rietveld 408576698