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 | |
166 // Fails often on Windows dbg bots. http://crbug.com/177163 | 152 // Fails often on Windows dbg bots. http://crbug.com/177163 |
167 #if defined(OS_WIN) | 153 #if defined(OS_WIN) |
168 #define MAYBE_ManagementPolicyAllowed DISABLED_ManagementPolicyAllowed | 154 #define MAYBE_ManagementPolicyAllowed DISABLED_ManagementPolicyAllowed |
169 #else | 155 #else |
170 #define MAYBE_ManagementPolicyAllowed ManagementPolicyAllowed | 156 #define MAYBE_ManagementPolicyAllowed ManagementPolicyAllowed |
171 #endif // defined(OS_WIN) | 157 #endif // defined(OS_WIN) |
172 // Tests actions on extensions when no management policy is in place. | 158 // Tests actions on extensions when no management policy is in place. |
173 IN_PROC_BROWSER_TEST_F(ExtensionManagementApiTest, | 159 IN_PROC_BROWSER_TEST_F(ExtensionManagementApiTest, |
174 MAYBE_ManagementPolicyAllowed) { | 160 MAYBE_ManagementPolicyAllowed) { |
175 LoadExtensions(); | 161 LoadExtensions(); |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
367 }; | 353 }; |
368 | 354 |
369 IN_PROC_BROWSER_TEST_F(ExtensionManagementApiStreamlinedAppsTest, LaunchType) { | 355 IN_PROC_BROWSER_TEST_F(ExtensionManagementApiStreamlinedAppsTest, LaunchType) { |
370 LoadExtensions(); | 356 LoadExtensions(); |
371 base::FilePath basedir = test_data_dir_.AppendASCII("management"); | 357 base::FilePath basedir = test_data_dir_.AppendASCII("management"); |
372 LoadNamedExtension(basedir, "packaged_app"); | 358 LoadNamedExtension(basedir, "packaged_app"); |
373 | 359 |
374 ASSERT_TRUE(RunExtensionSubtest("management/test", | 360 ASSERT_TRUE(RunExtensionSubtest("management/test", |
375 "launchType.html?streamlined-hosted-apps")); | 361 "launchType.html?streamlined-hosted-apps")); |
376 } | 362 } |
OLD | NEW |