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

Unified Diff: chrome/browser/extensions/notifications_apitest.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/extensions/notifications_apitest.cc
diff --git a/chrome/browser/extensions/notifications_apitest.cc b/chrome/browser/extensions/notifications_apitest.cc
index a1a8b39fe9be1977b97dd314a064378c1c74bca9..99049bf54e9ec71712ea09968af14b9c68892dae 100644
--- a/chrome/browser/extensions/notifications_apitest.cc
+++ b/chrome/browser/extensions/notifications_apitest.cc
@@ -4,13 +4,11 @@
#include "chrome/browser/extensions/extension_apitest.h"
+#include "base/logging.h"
#include "chrome/browser/notifications/desktop_notification_service.h"
#include "chrome/browser/notifications/desktop_notification_service_factory.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
-
-#if defined(ENABLE_MESSAGE_CENTER)
-
#include "chrome/browser/extensions/extension_process_manager.h"
#include "chrome/browser/extensions/lazy_background_page_test_util.h"
#include "chrome/common/chrome_switches.h"
@@ -56,23 +54,18 @@ class NotificationIdleTest : public RichWebkitNotificationTest {
}
};
-#endif
-
// TODO(kbr): remove: http://crbug.com/222296
#if defined(OS_MACOSX)
#import "base/mac/mac_util.h"
#endif
IN_PROC_BROWSER_TEST_F(ExtensionApiTest, NotificationsNoPermission) {
-#if defined(OS_LINUX) && defined(TOOLKIT_VIEWS)
- // Notifications not supported on linux/views yet.
-#else
+ SKIP_THIS_TEST_IF_MESSAGE_CENTER_DISABLED();
sky 2013/05/09 15:50:38 Having this compile switch still results in spinni
Dmitry Titov 2013/05/10 00:16:45 Done.
ASSERT_TRUE(RunExtensionTest("notifications/has_not_permission")) << message_;
-#endif
}
-#if defined(ENABLE_MESSAGE_CENTER)
IN_PROC_BROWSER_TEST_F(RichWebkitNotificationTest, NoHTMLNotifications) {
+ SKIP_THIS_TEST_IF_MESSAGE_CENTER_DISABLED();
ASSERT_TRUE(RunExtensionTest("notifications/no_html")) << message_;
}
@@ -80,27 +73,14 @@ IN_PROC_BROWSER_TEST_F(RichWebkitNotificationTest, NoHTMLNotifications) {
// HTML notifications fail on ChromeOS whether or not rich notifications
// are enabled.
IN_PROC_BROWSER_TEST_F(DisabledRichWebkitNotificationTest,
- HasHTMLNotifications) {
+ HasHTMLNotificationsAndManifestPermission) {
ASSERT_FALSE(message_center::IsRichNotificationEnabled());
ASSERT_TRUE(RunExtensionTest("notifications/has_permission_manifest"))
<< message_;
}
#endif
-#elif !defined(OS_LINUX) || !defined(TOOLKIT_VIEWS)
-// Notifications not supported on linux/views yet.
-IN_PROC_BROWSER_TEST_F(ExtensionApiTest,
- NotificationsHasPermissionManifest) {
- ASSERT_TRUE(RunExtensionTest("notifications/has_permission_manifest"))
- << message_;
-}
-#endif
-
IN_PROC_BROWSER_TEST_F(ExtensionApiTest, NotificationsHasPermission) {
-#if defined(OS_LINUX) && defined(TOOLKIT_VIEWS)
- // Notifications not supported on linux/views yet.
-#else
-
#if defined(OS_MACOSX)
// TODO(kbr): re-enable: http://crbug.com/222296
if (base::mac::IsOSMountainLionOrLater())
@@ -112,11 +92,10 @@ IN_PROC_BROWSER_TEST_F(ExtensionApiTest, NotificationsHasPermission) {
"chrome-extension://peoadpeiejnhkmpaakpnompolbglelel"));
ASSERT_TRUE(RunExtensionTest("notifications/has_permission_prefs"))
<< message_;
-#endif
}
-#if defined(ENABLE_MESSAGE_CENTER)
IN_PROC_BROWSER_TEST_F(NotificationIdleTest, NotificationsAllowUnload) {
+ SKIP_THIS_TEST_IF_MESSAGE_CENTER_DISABLED();
const extensions::Extension* extension =
LoadExtensionAndWait("notifications/api/unload");
ASSERT_TRUE(extension) << message_;
@@ -126,4 +105,3 @@ IN_PROC_BROWSER_TEST_F(NotificationIdleTest, NotificationsAllowUnload) {
extensions::ExtensionSystem::Get(profile())->process_manager();
EXPECT_FALSE(pm->GetBackgroundHostForExtension(last_loaded_extension_id_));
}
-#endif

Powered by Google App Engine
This is Rietveld 408576698