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

Unified Diff: chrome/browser/notifications/login_state_notification_blocker_chromeos_browsertest.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_browsertest.cc
diff --git a/chrome/browser/notifications/login_state_notification_blocker_chromeos_browsertest.cc b/chrome/browser/notifications/login_state_notification_blocker_chromeos_browsertest.cc
index bd7b90dd43e8720d7dd09d2b583ace18b7d34ec0..00cb63dbbc011451756e75e14d17fa6319727bff 100644
--- a/chrome/browser/notifications/login_state_notification_blocker_chromeos_browsertest.cc
+++ b/chrome/browser/notifications/login_state_notification_blocker_chromeos_browsertest.cc
@@ -6,6 +6,7 @@
#include "ash/shell.h"
#include "base/command_line.h"
#include "base/macros.h"
+#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/chromeos/login/login_manager_test.h"
#include "chrome/browser/chromeos/login/startup_utils.h"
#include "chrome/browser/chromeos/login/ui/user_adding_screen.h"
@@ -13,6 +14,7 @@
#include "content/public/test/test_utils.h"
#include "ui/message_center/message_center.h"
+using base::UTF8ToUTF16;
using namespace testing;
namespace {
@@ -96,7 +98,12 @@ class LoginStateNotificationBlockerChromeOSBrowserTest
bool ShouldShowNotificationAsPopup(
const message_center::NotifierId& notifier_id) {
- return blocker_->ShouldShowNotificationAsPopup(notifier_id);
+ message_center::Notification notification(
+ message_center::NOTIFICATION_TYPE_SIMPLE, "browser-id",
+ UTF8ToUTF16("browser-title"), UTF8ToUTF16("browser-message"),
+ gfx::Image(), UTF8ToUTF16("browser-source"), GURL(),
+ notifier_id, message_center::RichNotificationData(), NULL);
+ return blocker_->ShouldShowNotificationAsPopup(notification);
}
private:

Powered by Google App Engine
This is Rietveld 408576698