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

Side by Side Diff: ui/message_center/views/message_center_view_unittest.cc

Issue 1961813002: Show no-notification message in the bottom label of message center (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reused the existing string Created 4 years, 7 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
« no previous file with comments | « ui/message_center/views/message_center_view.cc ('k') | ui/strings/ui_strings.grd » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 #include "ui/message_center/views/message_center_view.h" 5 #include "ui/message_center/views/message_center_view.h"
6 6
7 #include <map> 7 #include <map>
8 #include <memory> 8 #include <memory>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 base::UTF8ToUTF16("display source"), GURL(), 191 base::UTF8ToUTF16("display source"), GURL(),
192 NotifierId(NotifierId::APPLICATION, "extension_id"), 192 NotifierId(NotifierId::APPLICATION, "extension_id"),
193 message_center::RichNotificationData(), NULL); 193 message_center::RichNotificationData(), NULL);
194 194
195 // ...and a list for it. 195 // ...and a list for it.
196 notifications_.insert(notification1); 196 notifications_.insert(notification1);
197 notifications_.insert(notification2); 197 notifications_.insert(notification2);
198 message_center_->SetVisibleNotifications(notifications_); 198 message_center_->SetVisibleNotifications(notifications_);
199 199
200 // Then create a new MessageCenterView with that single notification. 200 // Then create a new MessageCenterView with that single notification.
201 base::string16 title;
202 message_center_view_.reset(new MessageCenterView( 201 message_center_view_.reset(new MessageCenterView(
203 message_center_.get(), NULL, 100, false, /*top_down =*/false, title)); 202 message_center_.get(), NULL, 100, false, /*top_down =*/false));
204 GetMessageListView()->quit_message_loop_after_animation_for_test_ = true; 203 GetMessageListView()->quit_message_loop_after_animation_for_test_ = true;
205 GetMessageCenterView()->SetBounds(0, 0, 380, 600); 204 GetMessageCenterView()->SetBounds(0, 0, 380, 600);
206 message_center_view_->SetNotifications(notifications_); 205 message_center_view_->SetNotifications(notifications_);
207 206
208 // Wait until the animation finishes if available. 207 // Wait until the animation finishes if available.
209 if (GetAnimator()->IsAnimating()) 208 if (GetAnimator()->IsAnimating())
210 base::MessageLoop::current()->Run(); 209 base::MessageLoop::current()->Run();
211 } 210 }
212 211
213 void MessageCenterViewTest::TearDown() { 212 void MessageCenterViewTest::TearDown() {
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 AddNotification( 593 AddNotification(
595 std::unique_ptr<Notification>(new Notification(pinned_notification))); 594 std::unique_ptr<Notification>(new Notification(pinned_notification)));
596 595
597 // There should be 1 pinned notification. 596 // There should be 1 pinned notification.
598 EXPECT_EQ(1u, GetMessageCenter()->GetVisibleNotifications().size()); 597 EXPECT_EQ(1u, GetMessageCenter()->GetVisibleNotifications().size());
599 EXPECT_FALSE(close_button->enabled()); 598 EXPECT_FALSE(close_button->enabled());
600 #endif // defined(OS_CHROMEOS) 599 #endif // defined(OS_CHROMEOS)
601 } 600 }
602 601
603 } // namespace message_center 602 } // namespace message_center
OLDNEW
« no previous file with comments | « ui/message_center/views/message_center_view.cc ('k') | ui/strings/ui_strings.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698