| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/browser/extensions/extension_apitest.h" | 5 #include "chrome/browser/extensions/extension_apitest.h" |
| 6 | 6 |
| 7 #include "chrome/browser/notifications/desktop_notification_service.h" | 7 #include "chrome/browser/notifications/desktop_notification_service.h" |
| 8 #include "chrome/browser/notifications/desktop_notification_service_factory.h" | 8 #include "chrome/browser/notifications/desktop_notification_service_factory.h" |
| 9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
| 10 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
| 11 | 11 |
| 12 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, DISABLED_NotificationsNoPermission) { | 12 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, NotificationsNoPermission) { |
| 13 #if defined(OS_LINUX) && defined(TOOLKIT_VIEWS) | 13 #if defined(OS_LINUX) && defined(TOOLKIT_VIEWS) |
| 14 // Notifications not supported on linux/views yet. | 14 // Notifications not supported on linux/views yet. |
| 15 #else | 15 #else |
| 16 ASSERT_TRUE(RunExtensionTest("notifications/has_not_permission")) << message_; | 16 ASSERT_TRUE(RunExtensionTest("notifications/has_not_permission")) << message_; |
| 17 #endif | 17 #endif |
| 18 } | 18 } |
| 19 | 19 |
| 20 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, | 20 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, NotificationsHasPermissionManifest) { |
| 21 DISABLED_NotificationsHasPermissionManifest) { | |
| 22 #if defined(OS_LINUX) && defined(TOOLKIT_VIEWS) | 21 #if defined(OS_LINUX) && defined(TOOLKIT_VIEWS) |
| 23 // Notifications not supported on linux/views yet. | 22 // Notifications not supported on linux/views yet. |
| 24 #else | 23 #else |
| 25 ASSERT_TRUE(RunExtensionTest("notifications/has_permission_manifest")) | 24 ASSERT_TRUE(RunExtensionTest("notifications/has_permission_manifest")) |
| 26 << message_; | 25 << message_; |
| 27 #endif | 26 #endif |
| 28 } | 27 } |
| 29 | 28 |
| 30 // http://crbug.com/98061 | 29 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, NotificationsHasPermission) { |
| 31 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, DISABLED_NotificationsHasPermission) { | |
| 32 #if defined(OS_LINUX) && defined(TOOLKIT_VIEWS) | 30 #if defined(OS_LINUX) && defined(TOOLKIT_VIEWS) |
| 33 // Notifications not supported on linux/views yet. | 31 // Notifications not supported on linux/views yet. |
| 34 #else | 32 #else |
| 35 DesktopNotificationServiceFactory::GetForProfile(browser()->profile()) | 33 DesktopNotificationServiceFactory::GetForProfile(browser()->profile()) |
| 36 ->GrantPermission(GURL( | 34 ->GrantPermission(GURL( |
| 37 "chrome-extension://peoadpeiejnhkmpaakpnompolbglelel")); | 35 "chrome-extension://peoadpeiejnhkmpaakpnompolbglelel")); |
| 38 ASSERT_TRUE(RunExtensionTest("notifications/has_permission_prefs")) | 36 ASSERT_TRUE(RunExtensionTest("notifications/has_permission_prefs")) |
| 39 << message_; | 37 << message_; |
| 40 #endif | 38 #endif |
| 41 } | 39 } |
| OLD | NEW |