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

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

Issue 14141003: [Mac][MC] Fix bustage from various refactorings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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
« no previous file with comments | « no previous file | ui/message_center/test/run_all_unittests.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 ef304cb3751ea35829af1223719dc64341a95735..24543cf71ef79b76d4ecae78b10cf51e3b798cb6 100644
--- a/ui/message_center/cocoa/notification_controller_unittest.mm
+++ b/ui/message_center/cocoa/notification_controller_unittest.mm
@@ -16,7 +16,7 @@
namespace {
-class MockMessageCenter : public FakeMessageCenter {
+class MockMessageCenter : public message_center::FakeMessageCenter {
public:
MockMessageCenter()
: last_removed_by_user_(false),
@@ -26,7 +26,8 @@ class MockMessageCenter : public FakeMessageCenter {
virtual void RemoveNotification(const std::string& id,
bool by_user) OVERRIDE {
last_removed_id_ = id;
- last_removed_by_user_ = by_user_;
+ last_removed_by_user_ = by_user;
+ ++remove_count_;
}
const std::string& last_removed_id() const { return last_removed_id_; }
@@ -82,7 +83,7 @@ TEST_F(NotificationControllerTest, BasicLayout) {
scoped_nsobject<MCNotificationController> controller(
[[MCNotificationController alloc] initWithNotification:notification.get()
- changeObserver:NULL]);
+ messageCenter:NULL]);
[controller view];
EXPECT_EQ(TestIcon(), [[controller iconView] image]);
@@ -108,7 +109,7 @@ TEST_F(NotificationControllerTest, OverflowText) {
NULL));
scoped_nsobject<MCNotificationController> controller(
[[MCNotificationController alloc] initWithNotification:notification.get()
- changeObserver:NULL]);
+ messageCenter:NULL]);
[controller view];
EXPECT_GT(NSHeight([[controller view] frame]),
@@ -132,9 +133,9 @@ TEST_F(NotificationControllerTest, Close) {
messageCenter:&messageCenter]);
[controller view];
- EXPECT_TRUE(1, messageCenter.remove_count());
+ [[controller closeButton] performClick:nil];
+
+ EXPECT_EQ(1, messageCenter.remove_count());
EXPECT_EQ("an_id", messageCenter.last_removed_id());
EXPECT_TRUE(messageCenter.last_removed_by_user());
-
- [[controller closeButton] performClick:nil];
}
« no previous file with comments | « no previous file | ui/message_center/test/run_all_unittests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698