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

Side by Side Diff: chrome/browser/notifications/notification_browsertest.cc

Issue 14631005: Enable users of NotificationUIManager to specify binary images. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase for relanding. Created 7 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <deque> 5 #include <deque>
6 #include <string> 6 #include <string>
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after
535 message_center::MessageCenter::Get()->GetNotifications(); 535 message_center::MessageCenter::Get()->GetNotifications();
536 EXPECT_EQ(ASCIIToUTF16("My Title"), (*notifications.rbegin())->title()); 536 EXPECT_EQ(ASCIIToUTF16("My Title"), (*notifications.rbegin())->title());
537 EXPECT_EQ(ASCIIToUTF16("My Body"), (*notifications.rbegin())->message()); 537 EXPECT_EQ(ASCIIToUTF16("My Body"), (*notifications.rbegin())->message());
538 } else { 538 } else {
539 const std::deque<Balloon*>& balloons = GetActiveBalloons(); 539 const std::deque<Balloon*>& balloons = GetActiveBalloons();
540 ASSERT_EQ(1U, balloons.size()); 540 ASSERT_EQ(1U, balloons.size());
541 Balloon* balloon = balloons[0]; 541 Balloon* balloon = balloons[0];
542 const Notification& notification = balloon->notification(); 542 const Notification& notification = balloon->notification();
543 EXPECT_EQ(EXPECTED_ICON_URL, notification.icon_url()); 543 EXPECT_EQ(EXPECTED_ICON_URL, notification.icon_url());
544 EXPECT_EQ(ASCIIToUTF16("My Title"), notification.title()); 544 EXPECT_EQ(ASCIIToUTF16("My Title"), notification.title());
545 EXPECT_EQ(ASCIIToUTF16("My Body"), notification.body()); 545 EXPECT_EQ(ASCIIToUTF16("My Body"), notification.message());
546 } 546 }
547 } 547 }
548 548
549 IN_PROC_BROWSER_TEST_F(NotificationsTest, TestCloseNotification) { 549 IN_PROC_BROWSER_TEST_F(NotificationsTest, TestCloseNotification) {
550 #if defined(OS_MACOSX) 550 #if defined(OS_MACOSX)
551 // TODO(kbr): re-enable: http://crbug.com/222296 551 // TODO(kbr): re-enable: http://crbug.com/222296
552 if (base::mac::IsOSMountainLionOrLater()) 552 if (base::mac::IsOSMountainLionOrLater())
553 return; 553 return;
554 #endif 554 #endif
555 555
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
954 EXPECT_EQ(ASCIIToUTF16("Title2"), (*notifications.rbegin())->title()); 954 EXPECT_EQ(ASCIIToUTF16("Title2"), (*notifications.rbegin())->title());
955 EXPECT_EQ(ASCIIToUTF16("Body2"), (*notifications.rbegin())->message()); 955 EXPECT_EQ(ASCIIToUTF16("Body2"), (*notifications.rbegin())->message());
956 } else { 956 } else {
957 const std::deque<Balloon*>& balloons = GetActiveBalloons(); 957 const std::deque<Balloon*>& balloons = GetActiveBalloons();
958 ASSERT_EQ(1U, balloons.size()); 958 ASSERT_EQ(1U, balloons.size());
959 Balloon* balloon = balloons[0]; 959 Balloon* balloon = balloons[0];
960 const Notification& notification = balloon->notification(); 960 const Notification& notification = balloon->notification();
961 GURL EXPECTED_ICON_URL = test_server()->GetURL(kExpectedIconUrl); 961 GURL EXPECTED_ICON_URL = test_server()->GetURL(kExpectedIconUrl);
962 EXPECT_EQ(EXPECTED_ICON_URL, notification.icon_url()); 962 EXPECT_EQ(EXPECTED_ICON_URL, notification.icon_url());
963 EXPECT_EQ(ASCIIToUTF16("Title2"), notification.title()); 963 EXPECT_EQ(ASCIIToUTF16("Title2"), notification.title());
964 EXPECT_EQ(ASCIIToUTF16("Body2"), notification.body()); 964 EXPECT_EQ(ASCIIToUTF16("Body2"), notification.message());
965 } 965 }
966 } 966 }
OLDNEW
« no previous file with comments | « chrome/browser/notifications/notification.cc ('k') | chrome/browser/notifications/notification_ui_manager_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698