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

Unified Diff: chrome/browser/notifications/login_state_notification_blocker_chromeos_unittest.cc

Issue 2198363002: Pass Notification into NotificationBlocker ShouldShow* methods (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Ash build errors Created 4 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: chrome/browser/notifications/login_state_notification_blocker_chromeos_unittest.cc
diff --git a/chrome/browser/notifications/login_state_notification_blocker_chromeos_unittest.cc b/chrome/browser/notifications/login_state_notification_blocker_chromeos_unittest.cc
index b5d3a1f8d3a276e7a91bedd239d8363f6188f57d..e28ed29bdb03cb0725ba538dd2b90b5667b5bef7 100644
--- a/chrome/browser/notifications/login_state_notification_blocker_chromeos_unittest.cc
+++ b/chrome/browser/notifications/login_state_notification_blocker_chromeos_unittest.cc
@@ -11,10 +11,13 @@
#include "ash/test/ash_test_base.h"
#include "base/command_line.h"
#include "base/macros.h"
+#include "base/strings/utf_string_conversions.h"
#include "chromeos/login/login_state.h"
#include "ui/message_center/message_center.h"
#include "ui/message_center/notification.h"
+using base::UTF8ToUTF16;
+
class LoginStateNotificationBlockerChromeOSTest
: public ash::test::AshTestBase,
public message_center::NotificationBlocker::Observer {
@@ -54,7 +57,12 @@ class LoginStateNotificationBlockerChromeOSTest
bool ShouldShowNotificationAsPopup(
const message_center::NotifierId& notifier_id) {
- return blocker_->ShouldShowNotificationAsPopup(notifier_id);
+ message_center::Notification notification(
+ message_center::NOTIFICATION_TYPE_SIMPLE, "chromeos-id",
+ UTF8ToUTF16("chromeos-title"), UTF8ToUTF16("chromeos-message"),
+ gfx::Image(), UTF8ToUTF16("chromeos-source"), GURL(),
+ notifier_id, message_center::RichNotificationData(), NULL);
+ return blocker_->ShouldShowNotificationAsPopup(notification);
}
private:

Powered by Google App Engine
This is Rietveld 408576698