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

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

Issue 14631021: Revert 199625 "Remove ENABLE_MESSAGE_CENTER" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: 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: trunk/src/chrome/browser/notifications/message_center_notifications_browsertest.cc
===================================================================
--- trunk/src/chrome/browser/notifications/message_center_notifications_browsertest.cc (revision 199638)
+++ trunk/src/chrome/browser/notifications/message_center_notifications_browsertest.cc (working copy)
@@ -16,8 +16,10 @@
#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"
-#include "ui/message_center/message_center_util.h"
+#endif
class MessageCenterNotificationsTest : public InProcessBrowserTest {
public:
@@ -96,36 +98,19 @@
IN_PROC_BROWSER_TEST_F(MessageCenterNotificationsTest, RetrieveBaseParts) {
// Make sure comamnd-line switch has an effect.
- EXPECT_EQ(NotificationUIManager::DelegatesToMessageCenter(),
- message_center::IsRichNotificationEnabled());
+ EXPECT_TRUE(NotificationUIManager::DelegatesToMessageCenter());
EXPECT_TRUE(manager());
EXPECT_TRUE(message_center());
}
-// MessaceCenter-specific test.
-#if defined(RUN_MESSAGE_CENTER_TESTS)
-#define MAYBE_BasicAddCancel BasicAddCancel
-#else
-#define MAYBE_BasicAddCancel DISABLED_BasicAddCancel
-#endif
-
-IN_PROC_BROWSER_TEST_F(MessageCenterNotificationsTest, MAYBE_BasicAddCancel) {
- EXPECT_TRUE(NotificationUIManager::DelegatesToMessageCenter());
+IN_PROC_BROWSER_TEST_F(MessageCenterNotificationsTest, BasicAddCancel) {
manager()->Add(CreateTestNotification("hey"), profile());
EXPECT_EQ(1u, message_center()->NotificationCount());
manager()->CancelById("hey");
EXPECT_EQ(0u, message_center()->NotificationCount());
}
-// MessaceCenter-specific test.
-#if defined(RUN_MESSAGE_CENTER_TESTS)
-#define MAYBE_BasicDelegate BasicDelegate
-#else
-#define MAYBE_BasicDelegate DISABLED_BasicDelegate
-#endif
-
-IN_PROC_BROWSER_TEST_F(MessageCenterNotificationsTest, MAYBE_BasicDelegate) {
- EXPECT_TRUE(NotificationUIManager::DelegatesToMessageCenter());
+IN_PROC_BROWSER_TEST_F(MessageCenterNotificationsTest, BasicDelegate) {
TestDelegate* delegate;
manager()->Add(CreateTestNotification("hey", &delegate), profile());
// Verify that delegate accumulated correct log of events.
@@ -136,16 +121,7 @@
delegate->Release();
}
-// MessaceCenter-specific test.
-#if defined(RUN_MESSAGE_CENTER_TESTS)
-#define MAYBE_ButtonClickedDelegate ButtonClickedDelegate
-#else
-#define MAYBE_ButtonClickedDelegate DISABLED_ButtonClickedDelegate
-#endif
-
-IN_PROC_BROWSER_TEST_F(MessageCenterNotificationsTest,
- MAYBE_ButtonClickedDelegate) {
- EXPECT_TRUE(NotificationUIManager::DelegatesToMessageCenter());
+IN_PROC_BROWSER_TEST_F(MessageCenterNotificationsTest, ButtonClickedDelegate) {
TestDelegate* delegate;
manager()->Add(CreateTestNotification("n", &delegate), profile());
message_center()->ClickOnNotificationButton("n", 1);

Powered by Google App Engine
This is Rietveld 408576698