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

Side by Side Diff: ui/message_center/cocoa/popup_collection_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, 3 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 #import "ui/message_center/cocoa/popup_collection.h" 5 #import "ui/message_center/cocoa/popup_collection.h"
6 6
7 #include "base/mac/scoped_nsobject.h" 7 #include "base/mac/scoped_nsobject.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 center_->AddNotification(notification.Pass()); 69 center_->AddNotification(notification.Pass());
70 70
71 notification.reset(new message_center::Notification( 71 notification.reset(new message_center::Notification(
72 message_center::NOTIFICATION_TYPE_SIMPLE, 72 message_center::NOTIFICATION_TYPE_SIMPLE,
73 "3", 73 "3",
74 ASCIIToUTF16("Three"), 74 ASCIIToUTF16("Three"),
75 ASCIIToUTF16("This is the third notification " 75 ASCIIToUTF16("This is the third notification "
76 "that has a much longer body " 76 "that has a much longer body "
77 "than the other notifications. It " 77 "than the other notifications. It "
78 "may not fit on the screen if we " 78 "may not fit on the screen if we "
79 "set the screen size too small."), 79 "set the screen size too small or "
80 "if the notification is way too big"),
80 gfx::Image(), 81 gfx::Image(),
81 string16(), 82 string16(),
82 message_center::NotifierId(), 83 message_center::NotifierId(),
83 message_center::RichNotificationData(), 84 message_center::RichNotificationData(),
84 NULL)); 85 NULL));
85 center_->AddNotification(notification.Pass()); 86 center_->AddNotification(notification.Pass());
86 WaitForAnimationEnded(); 87 WaitForAnimationEnded();
87 } 88 }
88 89
89 bool CheckSpacingBetween(MCPopupController* upper, MCPopupController* lower) { 90 bool CheckSpacingBetween(MCPopupController* upper, MCPopupController* lower) {
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 string16(), 352 string16(),
352 message_center::NotifierId(), 353 message_center::NotifierId(),
353 message_center::RichNotificationData(), 354 message_center::RichNotificationData(),
354 NULL)); 355 NULL));
355 center_->UpdateNotification("1", notification.Pass()); 356 center_->UpdateNotification("1", notification.Pass());
356 357
357 // Release the popup collection before the animation ends. No crash should 358 // Release the popup collection before the animation ends. No crash should
358 // be expected. 359 // be expected.
359 collection_.reset(); 360 collection_.reset();
360 } 361 }
OLDNEW
« no previous file with comments | « ui/message_center/cocoa/notification_controller_unittest.mm ('k') | ui/message_center/message_center_style.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698