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

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

Issue 23462005: Adds the contextMessage field to notifications. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Adjust unit test due to bugfix in toast layout. 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 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 87aced2fc8ca3ec255ca352f8a03665d120cb800..fb6a7dea90ba6eb391cee7e7de4443abcb4a085a 100644
--- a/ui/message_center/cocoa/notification_controller_unittest.mm
+++ b/ui/message_center/cocoa/notification_controller_unittest.mm
@@ -84,6 +84,10 @@ class MockMessageCenter : public message_center::FakeMessageCenter {
return message_.get();
}
+- (NSTextField*)contextMessageView {
+ return contextMessage_.get();
+}
+
- (NSView*)listItemView {
return listItemView_.get();
}
@@ -272,6 +276,7 @@ TEST_F(NotificationControllerTest, List) {
UTF8ToUTF16("Second title"),
UTF8ToUTF16("second slightly longer message"));
optional.items.push_back(item2);
+ optional.context_message = UTF8ToUTF16("Context Message");
scoped_ptr<message_center::Notification> notification(
new message_center::Notification(
@@ -293,6 +298,7 @@ TEST_F(NotificationControllerTest, List) {
EXPECT_FALSE([[controller titleView] isHidden]);
EXPECT_TRUE([[controller messageView] isHidden]);
+ EXPECT_FALSE([[controller contextMessageView] isHidden]);
EXPECT_EQ(2u, [[[controller listItemView] subviews] count]);
EXPECT_LT(NSMaxY([[controller listItemView] frame]),
« no previous file with comments | « ui/message_center/cocoa/notification_controller.mm ('k') | ui/message_center/cocoa/popup_collection_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698