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

Unified Diff: trunk/src/chrome/browser/notifications/sync_notifier/synced_notification_unittest.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/sync_notifier/synced_notification_unittest.cc
===================================================================
--- trunk/src/chrome/browser/notifications/sync_notifier/synced_notification_unittest.cc (revision 199638)
+++ trunk/src/chrome/browser/notifications/sync_notifier/synced_notification_unittest.cc (working copy)
@@ -13,8 +13,10 @@
#include "sync/protocol/sync.pb.h"
#include "sync/protocol/synced_notification_specifics.pb.h"
#include "testing/gtest/include/gtest/gtest.h"
+#if defined(ENABLE_MESSAGE_CENTER)
#include "ui/message_center/message_center_util.h"
#include "ui/message_center/notification_types.h"
+#endif // ENABLE_MESSAGE_CENTER
using syncer::SyncData;
using notifier::SyncedNotification;
@@ -26,11 +28,19 @@
const uint64 kFakeCreationTime = 42;
const int kProtobufPriority = static_cast<int>(
sync_pb::CoalescedSyncedNotification_Priority_LOW);
+#if defined (ENABLE_MESSAGE_CENTER)
const int kNotificationPriority = static_cast<int>(
message_center::LOW_PRIORITY);
+#else // ENABLE_MESSAGE_CENTER
+const int kNotificationPriority = 1;
+#endif // ENABLE_MESSAGE_CENTER
bool UseRichNotifications() {
+#if defined(ENABLE_MESSAGE_CENTER)
return message_center::IsRichNotificationEnabled();
+#else // ENABLE_MESSAGE_CENTER
+ return false;
+#endif // ENABLE_MESSAGE_CENTER
}
const char kTitle1[] = "New appointment at 2:15";
@@ -562,6 +572,8 @@
if (!UseRichNotifications())
return;
+#if defined(ENABLE_MESSAGE_CENTER)
+
StubNotificationUIManager notification_manager;
// Call the method under test using the pre-populated data.
@@ -623,6 +635,8 @@
<< "Expected: " << expected_fields
<< ", but actual: " << *actual_fields;
+#endif // ENABLE_MESSAGE_CENTER
+
}
// TODO(petewil): Add a test for a notification being read and or deleted.

Powered by Google App Engine
This is Rietveld 408576698