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

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

Issue 15025002: Remove ENABLE_MESSAGE_CENTER (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: one moer fix Created 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/notifications/message_center_notifications_browsertest.cc
diff --git a/chrome/browser/notifications/message_center_notifications_browsertest.cc b/chrome/browser/notifications/message_center_notifications_browsertest.cc
index 556eb5a41e32cf82886f7b5ba60a19eb379960cb..5707fc515da7953f460cf84ef017bb02fde9a5d7 100644
--- a/chrome/browser/notifications/message_center_notifications_browsertest.cc
+++ b/chrome/browser/notifications/message_center_notifications_browsertest.cc
@@ -16,10 +16,8 @@
#include "chrome/browser/ui/browser.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "ui/message_center/message_center.h"
-
-#if defined(ENABLE_MESSAGE_CENTER)
#include "ui/message_center/message_center_switches.h"
-#endif
+#include "ui/message_center/message_center_util.h"
class MessageCenterNotificationsTest : public InProcessBrowserTest {
public:
@@ -98,12 +96,15 @@ class MessageCenterNotificationsTest : public InProcessBrowserTest {
IN_PROC_BROWSER_TEST_F(MessageCenterNotificationsTest, RetrieveBaseParts) {
// Make sure comamnd-line switch has an effect.
- EXPECT_TRUE(NotificationUIManager::DelegatesToMessageCenter());
+ EXPECT_EQ(NotificationUIManager::DelegatesToMessageCenter(),
+ message_center::IsRichNotificationEnabled());
EXPECT_TRUE(manager());
EXPECT_TRUE(message_center());
}
IN_PROC_BROWSER_TEST_F(MessageCenterNotificationsTest, BasicAddCancel) {
+ if (!NotificationUIManager::DelegatesToMessageCenter())
+ return;
manager()->Add(CreateTestNotification("hey"), profile());
EXPECT_EQ(1u, message_center()->NotificationCount());
manager()->CancelById("hey");
@@ -111,6 +112,8 @@ IN_PROC_BROWSER_TEST_F(MessageCenterNotificationsTest, BasicAddCancel) {
}
IN_PROC_BROWSER_TEST_F(MessageCenterNotificationsTest, BasicDelegate) {
+ if (!NotificationUIManager::DelegatesToMessageCenter())
+ return;
TestDelegate* delegate;
manager()->Add(CreateTestNotification("hey", &delegate), profile());
// Verify that delegate accumulated correct log of events.
@@ -122,6 +125,8 @@ IN_PROC_BROWSER_TEST_F(MessageCenterNotificationsTest, BasicDelegate) {
}
IN_PROC_BROWSER_TEST_F(MessageCenterNotificationsTest, ButtonClickedDelegate) {
+ if (!NotificationUIManager::DelegatesToMessageCenter())
+ return;
TestDelegate* delegate;
manager()->Add(CreateTestNotification("n", &delegate), profile());
message_center()->ClickOnNotificationButton("n", 1);

Powered by Google App Engine
This is Rietveld 408576698