| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
| 9 #include "chrome/browser/ui/browser.h" | 9 #include "chrome/browser/ui/browser.h" |
| 10 | 10 |
| 11 // Flaky, http://crbug.com/42314. | 11 // Flaky, http://crbug.com/42314. |
| 12 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, FLAKY_Notifications) { | 12 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, FLAKY_Notifications) { |
| 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 ASSERT_TRUE(RunExtensionTest("notifications/has_permission_manifest")) | 17 ASSERT_TRUE(RunExtensionTest("notifications/has_permission_manifest")) |
| 18 << message_; | 18 << message_; |
| 19 browser()->profile()->GetDesktopNotificationService() | 19 browser()->profile()->GetDesktopNotificationService() |
| 20 ->GrantPermission(GURL( | 20 ->GrantPermission(GURL( |
| 21 "chrome-extension://peoadpeiejnhkmpaakpnompolbglelel")); | 21 "chrome-extension://peoadpeiejnhkmpaakpnompolbglelel")); |
| 22 ASSERT_TRUE(RunExtensionTest("notifications/has_permission_prefs")) | 22 ASSERT_TRUE(RunExtensionTest("notifications/has_permission_prefs")) |
| 23 << message_; | 23 << message_; |
| 24 #endif | 24 #endif |
| 25 } | 25 } |
| 26 | 26 |
| OLD | NEW |