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

Unified Diff: chrome/browser/extensions/api/notifications/notifications_apitest.cc

Issue 1188213002: Making icon url for buttons in notification optional. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added Test case. Created 5 years, 6 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/extensions/api/notifications/notifications_apitest.cc
diff --git a/chrome/browser/extensions/api/notifications/notifications_apitest.cc b/chrome/browser/extensions/api/notifications/notifications_apitest.cc
index 014f19dba907f31f71545b14d0a4d1578388237d..9def0e611f50eef292408340ee220f259f242ed0 100644
--- a/chrome/browser/extensions/api/notifications/notifications_apitest.cc
+++ b/chrome/browser/extensions/api/notifications/notifications_apitest.cc
@@ -164,6 +164,7 @@ IN_PROC_BROWSER_TEST_F(NotificationsApiTest, TestPartialUpdate) {
const char kNewTitle[] = "Changed!";
const char kNewMessage[] = "Too late! The show ended yesterday";
int kNewPriority = 2;
+ const char kButtonTitle[] = "NewButton";
const message_center::NotificationList::Notifications& notifications =
g_browser_process->message_center()->GetVisibleNotifications();
@@ -174,7 +175,8 @@ IN_PROC_BROWSER_TEST_F(NotificationsApiTest, TestPartialUpdate) {
EXPECT_EQ(base::ASCIIToUTF16(kNewTitle), notification->title());
EXPECT_EQ(base::ASCIIToUTF16(kNewMessage), notification->message());
EXPECT_EQ(kNewPriority, notification->priority());
- EXPECT_EQ(0u, notification->buttons().size());
+ EXPECT_EQ(1u, notification->buttons().size());
+ EXPECT_EQ(base::ASCIIToUTF16(kButtonTitle), notification->buttons()[0].title);
}
IN_PROC_BROWSER_TEST_F(NotificationsApiTest, TestGetPermissionLevel) {

Powered by Google App Engine
This is Rietveld 408576698