OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/extensions/lazy_background_page_test_util.h" |
7 #include "chrome/browser/notifications/desktop_notification_service.h" | 8 #include "chrome/browser/notifications/desktop_notification_service.h" |
8 #include "chrome/browser/notifications/desktop_notification_service_factory.h" | 9 #include "chrome/browser/notifications/desktop_notification_service_factory.h" |
9 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
10 #include "chrome/browser/ui/browser.h" | 11 #include "chrome/browser/ui/browser.h" |
11 #include "chrome/browser/extensions/extension_process_manager.h" | |
12 #include "chrome/browser/extensions/lazy_background_page_test_util.h" | |
13 #include "chrome/common/extensions/extension.h" | 12 #include "chrome/common/extensions/extension.h" |
| 13 #include "extensions/browser/process_manager.h" |
14 #include "extensions/common/switches.h" | 14 #include "extensions/common/switches.h" |
15 #include "ui/message_center/message_center_switches.h" | 15 #include "ui/message_center/message_center_switches.h" |
16 #include "ui/message_center/message_center_util.h" | 16 #include "ui/message_center/message_center_util.h" |
17 | 17 |
18 class NotificationIdleTest : public ExtensionApiTest { | 18 class NotificationIdleTest : public ExtensionApiTest { |
19 protected: | 19 protected: |
20 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { | 20 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { |
21 ExtensionApiTest::SetUpCommandLine(command_line); | 21 ExtensionApiTest::SetUpCommandLine(command_line); |
22 | 22 |
23 command_line->AppendSwitchASCII( | 23 command_line->AppendSwitchASCII( |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 #else | 70 #else |
71 #define MAYBE_NotificationsAllowUnload DISABLED_NotificationsAllowUnload | 71 #define MAYBE_NotificationsAllowUnload DISABLED_NotificationsAllowUnload |
72 #endif | 72 #endif |
73 | 73 |
74 IN_PROC_BROWSER_TEST_F(NotificationIdleTest, MAYBE_NotificationsAllowUnload) { | 74 IN_PROC_BROWSER_TEST_F(NotificationIdleTest, MAYBE_NotificationsAllowUnload) { |
75 const extensions::Extension* extension = | 75 const extensions::Extension* extension = |
76 LoadExtensionAndWait("notifications/api/unload"); | 76 LoadExtensionAndWait("notifications/api/unload"); |
77 ASSERT_TRUE(extension) << message_; | 77 ASSERT_TRUE(extension) << message_; |
78 | 78 |
79 // Lazy Background Page has been shut down. | 79 // Lazy Background Page has been shut down. |
80 ExtensionProcessManager* pm = | 80 extensions::ProcessManager* pm = |
81 extensions::ExtensionSystem::Get(profile())->process_manager(); | 81 extensions::ExtensionSystem::Get(profile())->process_manager(); |
82 EXPECT_FALSE(pm->GetBackgroundHostForExtension(last_loaded_extension_id())); | 82 EXPECT_FALSE(pm->GetBackgroundHostForExtension(last_loaded_extension_id())); |
83 } | 83 } |
OLD | NEW |