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

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

Issue 14318002: Revert 194464 "Re-enable various ExtensionManagementApiTest tests." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 8 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/extensions/extension_apitest.h" 7 #include "chrome/browser/extensions/extension_apitest.h"
8 #include "chrome/browser/extensions/extension_service.h" 8 #include "chrome/browser/extensions/extension_service.h"
9 #include "chrome/browser/extensions/extension_system.h" 9 #include "chrome/browser/extensions/extension_system.h"
10 #include "chrome/browser/extensions/extension_test_message_listener.h" 10 #include "chrome/browser/extensions/extension_test_message_listener.h"
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 base::FilePath basedir = test_data_dir_.AppendASCII("management"); 101 base::FilePath basedir = test_data_dir_.AppendASCII("management");
102 InstallNamedExtension(basedir, "internal_extension", Manifest::INTERNAL); 102 InstallNamedExtension(basedir, "internal_extension", Manifest::INTERNAL);
103 InstallNamedExtension(basedir, "external_extension", 103 InstallNamedExtension(basedir, "external_extension",
104 Manifest::EXTERNAL_PREF); 104 Manifest::EXTERNAL_PREF);
105 InstallNamedExtension(basedir, "admin_extension", 105 InstallNamedExtension(basedir, "admin_extension",
106 Manifest::EXTERNAL_POLICY_DOWNLOAD); 106 Manifest::EXTERNAL_POLICY_DOWNLOAD);
107 107
108 ASSERT_TRUE(RunExtensionSubtest("management/test", "basics.html")); 108 ASSERT_TRUE(RunExtensionSubtest("management/test", "basics.html"));
109 } 109 }
110 110
111 IN_PROC_BROWSER_TEST_F(ExtensionManagementApiTest, Uninstall) { 111 // Disabled: http://crbug.com/174411
112 #if defined(OS_WIN)
113 #define MAYBE_Uninstall DISABLED_Uninstall
114 #else
115 #define MAYBE_Uninstall Uninstall
116 #endif
117
118 IN_PROC_BROWSER_TEST_F(ExtensionManagementApiTest, MAYBE_Uninstall) {
112 LoadExtensions(); 119 LoadExtensions();
113 ASSERT_TRUE(RunExtensionSubtest("management/test", "uninstall.html")); 120 ASSERT_TRUE(RunExtensionSubtest("management/test", "uninstall.html"));
114 } 121 }
115 122
116 // Tests actions on extensions when no management policy is in place. 123 // Tests actions on extensions when no management policy is in place.
117 IN_PROC_BROWSER_TEST_F(ExtensionManagementApiTest, ManagementPolicyAllowed) { 124 IN_PROC_BROWSER_TEST_F(ExtensionManagementApiTest, ManagementPolicyAllowed) {
118 LoadExtensions(); 125 LoadExtensions();
119 ExtensionService* service = extensions::ExtensionSystem::Get( 126 ExtensionService* service = extensions::ExtensionSystem::Get(
120 browser()->profile())->extension_service(); 127 browser()->profile())->extension_service();
121 EXPECT_TRUE(service->GetExtensionById(extension_ids_["enabled_extension"], 128 EXPECT_TRUE(service->GetExtensionById(extension_ids_["enabled_extension"],
(...skipping 22 matching lines...) Expand all
144 extensions::ManagementPolicy* policy = extensions::ExtensionSystem::Get( 151 extensions::ManagementPolicy* policy = extensions::ExtensionSystem::Get(
145 browser()->profile())->management_policy(); 152 browser()->profile())->management_policy();
146 policy->UnregisterAllProviders(); 153 policy->UnregisterAllProviders();
147 extensions::TestManagementPolicyProvider provider( 154 extensions::TestManagementPolicyProvider provider(
148 extensions::TestManagementPolicyProvider::PROHIBIT_MODIFY_STATUS); 155 extensions::TestManagementPolicyProvider::PROHIBIT_MODIFY_STATUS);
149 policy->RegisterProvider(&provider); 156 policy->RegisterProvider(&provider);
150 ASSERT_TRUE(RunExtensionSubtest("management/management_policy", 157 ASSERT_TRUE(RunExtensionSubtest("management/management_policy",
151 "prohibited.html")); 158 "prohibited.html"));
152 } 159 }
153 160
154 IN_PROC_BROWSER_TEST_F(ExtensionManagementApiTest, LaunchPanelApp) { 161 // Disabled. See http://crbug.com/176023
162 IN_PROC_BROWSER_TEST_F(ExtensionManagementApiTest, DISABLED_LaunchPanelApp) {
155 ExtensionService* service = extensions::ExtensionSystem::Get( 163 ExtensionService* service = extensions::ExtensionSystem::Get(
156 browser()->profile())->extension_service(); 164 browser()->profile())->extension_service();
157 165
158 // Load an extension that calls launchApp() on any app that gets 166 // Load an extension that calls launchApp() on any app that gets
159 // installed. 167 // installed.
160 ExtensionTestMessageListener launcher_loaded("launcher loaded", false); 168 ExtensionTestMessageListener launcher_loaded("launcher loaded", false);
161 ASSERT_TRUE(LoadExtension( 169 ASSERT_TRUE(LoadExtension(
162 test_data_dir_.AppendASCII("management/launch_on_install"))); 170 test_data_dir_.AppendASCII("management/launch_on_install")));
163 ASSERT_TRUE(launcher_loaded.WaitUntilSatisfied()); 171 ASSERT_TRUE(launcher_loaded.WaitUntilSatisfied());
164 172
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 211
204 // Find the app's browser. Apps that should load in a panel ignore 212 // Find the app's browser. Apps that should load in a panel ignore
205 // prefs, so we should still see the launch in a popup. 213 // prefs, so we should still see the launch in a popup.
206 ASSERT_EQ(2u, chrome::GetBrowserCount(browser()->profile(), 214 ASSERT_EQ(2u, chrome::GetBrowserCount(browser()->profile(),
207 browser()->host_desktop_type())); 215 browser()->host_desktop_type()));
208 app_browser = FindOtherBrowser(browser()); 216 app_browser = FindOtherBrowser(browser());
209 ASSERT_TRUE(app_browser->is_type_popup()); 217 ASSERT_TRUE(app_browser->is_type_popup());
210 ASSERT_TRUE(app_browser->is_app()); 218 ASSERT_TRUE(app_browser->is_app());
211 } 219 }
212 220
213 IN_PROC_BROWSER_TEST_F(ExtensionManagementApiTest, LaunchTabApp) { 221 // Disabled: http://crbug.com/230165
222 #if defined(OS_WIN)
223 #define MAYBE_LaunchTabApp DISABLED_LaunchTabApp
224 #else
225 #define MAYBE_LaunchTabApp LaunchTabApp
226 #endif
227 IN_PROC_BROWSER_TEST_F(ExtensionManagementApiTest, MAYBE_LaunchTabApp) {
214 ExtensionService* service = extensions::ExtensionSystem::Get( 228 ExtensionService* service = extensions::ExtensionSystem::Get(
215 browser()->profile())->extension_service(); 229 browser()->profile())->extension_service();
216 230
217 // Load an extension that calls launchApp() on any app that gets 231 // Load an extension that calls launchApp() on any app that gets
218 // installed. 232 // installed.
219 ExtensionTestMessageListener launcher_loaded("launcher loaded", false); 233 ExtensionTestMessageListener launcher_loaded("launcher loaded", false);
220 ASSERT_TRUE(LoadExtension( 234 ASSERT_TRUE(LoadExtension(
221 test_data_dir_.AppendASCII("management/launch_on_install"))); 235 test_data_dir_.AppendASCII("management/launch_on_install")));
222 ASSERT_TRUE(launcher_loaded.WaitUntilSatisfied()); 236 ASSERT_TRUE(launcher_loaded.WaitUntilSatisfied());
223 237
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 ASSERT_EQ(2, browser()->tab_strip_model()->count()); 276 ASSERT_EQ(2, browser()->tab_strip_model()->count());
263 #else 277 #else
264 // Find the app's browser. Opening in a new window will create 278 // Find the app's browser. Opening in a new window will create
265 // a new browser. 279 // a new browser.
266 ASSERT_EQ(2u, chrome::GetBrowserCount(browser()->profile(), 280 ASSERT_EQ(2u, chrome::GetBrowserCount(browser()->profile(),
267 browser()->host_desktop_type())); 281 browser()->host_desktop_type()));
268 Browser* app_browser = FindOtherBrowser(browser()); 282 Browser* app_browser = FindOtherBrowser(browser());
269 ASSERT_TRUE(app_browser->is_app()); 283 ASSERT_TRUE(app_browser->is_app());
270 #endif 284 #endif
271 } 285 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698