| 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 <map> | 5 #include <map> |
| 6 | 6 |
| 7 #include "chrome/browser/chrome_notification_types.h" | 7 #include "chrome/browser/chrome_notification_types.h" |
| 8 #include "chrome/browser/extensions/api/management/management_api.h" | 8 #include "chrome/browser/extensions/api/management/management_api.h" |
| 9 #include "chrome/browser/extensions/extension_apitest.h" | 9 #include "chrome/browser/extensions/extension_apitest.h" |
| 10 #include "chrome/browser/extensions/extension_service.h" | 10 #include "chrome/browser/extensions/extension_service.h" |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 } | 142 } |
| 143 | 143 |
| 144 IN_PROC_BROWSER_TEST_F(ExtensionManagementApiTest, | 144 IN_PROC_BROWSER_TEST_F(ExtensionManagementApiTest, |
| 145 CreateAppShortcutNotInStable) { | 145 CreateAppShortcutNotInStable) { |
| 146 extensions::ScopedCurrentChannel channel( | 146 extensions::ScopedCurrentChannel channel( |
| 147 chrome::VersionInfo::CHANNEL_STABLE); | 147 chrome::VersionInfo::CHANNEL_STABLE); |
| 148 ASSERT_TRUE(RunExtensionSubtest("management/test", | 148 ASSERT_TRUE(RunExtensionSubtest("management/test", |
| 149 "createAppShortcutNotInStable.html")); | 149 "createAppShortcutNotInStable.html")); |
| 150 } | 150 } |
| 151 | 151 |
| 152 IN_PROC_BROWSER_TEST_F(ExtensionManagementApiTest, GenerateAppForLink) { |
| 153 LoadExtensions(); |
| 154 ASSERT_TRUE(RunExtensionSubtest("management/test", |
| 155 "generateAppForLink.html")); |
| 156 } |
| 157 |
| 158 IN_PROC_BROWSER_TEST_F(ExtensionManagementApiTest, |
| 159 GenerateAppForLinkNotInStable) { |
| 160 extensions::ScopedCurrentChannel channel( |
| 161 chrome::VersionInfo::CHANNEL_STABLE); |
| 162 ASSERT_TRUE(RunExtensionSubtest("management/test", |
| 163 "generateAppForLinkNotInStable.html")); |
| 164 } |
| 165 |
| 152 // Fails often on Windows dbg bots. http://crbug.com/177163 | 166 // Fails often on Windows dbg bots. http://crbug.com/177163 |
| 153 #if defined(OS_WIN) | 167 #if defined(OS_WIN) |
| 154 #define MAYBE_ManagementPolicyAllowed DISABLED_ManagementPolicyAllowed | 168 #define MAYBE_ManagementPolicyAllowed DISABLED_ManagementPolicyAllowed |
| 155 #else | 169 #else |
| 156 #define MAYBE_ManagementPolicyAllowed ManagementPolicyAllowed | 170 #define MAYBE_ManagementPolicyAllowed ManagementPolicyAllowed |
| 157 #endif // defined(OS_WIN) | 171 #endif // defined(OS_WIN) |
| 158 // Tests actions on extensions when no management policy is in place. | 172 // Tests actions on extensions when no management policy is in place. |
| 159 IN_PROC_BROWSER_TEST_F(ExtensionManagementApiTest, | 173 IN_PROC_BROWSER_TEST_F(ExtensionManagementApiTest, |
| 160 MAYBE_ManagementPolicyAllowed) { | 174 MAYBE_ManagementPolicyAllowed) { |
| 161 LoadExtensions(); | 175 LoadExtensions(); |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 318 ASSERT_EQ(2, browser()->tab_strip_model()->count()); | 332 ASSERT_EQ(2, browser()->tab_strip_model()->count()); |
| 319 #else | 333 #else |
| 320 // Find the app's browser. Opening in a new window will create | 334 // Find the app's browser. Opening in a new window will create |
| 321 // a new browser. | 335 // a new browser. |
| 322 ASSERT_EQ(2u, chrome::GetBrowserCount(browser()->profile(), | 336 ASSERT_EQ(2u, chrome::GetBrowserCount(browser()->profile(), |
| 323 browser()->host_desktop_type())); | 337 browser()->host_desktop_type())); |
| 324 Browser* app_browser = FindOtherBrowser(browser()); | 338 Browser* app_browser = FindOtherBrowser(browser()); |
| 325 ASSERT_TRUE(app_browser->is_app()); | 339 ASSERT_TRUE(app_browser->is_app()); |
| 326 #endif | 340 #endif |
| 327 } | 341 } |
| OLD | NEW |