Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Side by Side Diff: chrome/browser/extensions/api/management/management_apitest.cc

Issue 266353006: Add generateAppForLink function in chrome.management (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 }; 367 };
354 368
355 IN_PROC_BROWSER_TEST_F(ExtensionManagementApiStreamlinedAppsTest, LaunchType) { 369 IN_PROC_BROWSER_TEST_F(ExtensionManagementApiStreamlinedAppsTest, LaunchType) {
356 LoadExtensions(); 370 LoadExtensions();
357 base::FilePath basedir = test_data_dir_.AppendASCII("management"); 371 base::FilePath basedir = test_data_dir_.AppendASCII("management");
358 LoadNamedExtension(basedir, "packaged_app"); 372 LoadNamedExtension(basedir, "packaged_app");
359 373
360 ASSERT_TRUE(RunExtensionSubtest("management/test", 374 ASSERT_TRUE(RunExtensionSubtest("management/test",
361 "launchType.html?streamlined-hosted-apps")); 375 "launchType.html?streamlined-hosted-apps"));
362 } 376 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698