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

Side by Side Diff: chrome/browser/extensions/webstore_startup_installer_browsertest.cc

Issue 345563008: Rename "managed (mode|user)" to "supervised user" (part 4) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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
« no previous file with comments | « chrome/browser/extensions/installed_loader.cc ('k') | chrome/browser/profiles/avatar_menu.h » ('j') | 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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "chrome/browser/chrome_notification_types.h" 6 #include "chrome/browser/chrome_notification_types.h"
7 #include "chrome/browser/extensions/extension_install_ui.h" 7 #include "chrome/browser/extensions/extension_install_ui.h"
8 #include "chrome/browser/extensions/extension_service.h" 8 #include "chrome/browser/extensions/extension_service.h"
9 #include "chrome/browser/extensions/startup_helper.h" 9 #include "chrome/browser/extensions/startup_helper.h"
10 #include "chrome/browser/extensions/webstore_installer_test.h" 10 #include "chrome/browser/extensions/webstore_installer_test.h"
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 extension_service->AddExtension(hosted_app.get()); 164 extension_service->AddExtension(hosted_app.get());
165 EXPECT_TRUE(extension_service->extensions()->Contains(hosted_app->id())); 165 EXPECT_TRUE(extension_service->extensions()->Contains(hosted_app->id()));
166 166
167 ui_test_utils::NavigateToURL(browser(), kInstallUrl); 167 ui_test_utils::NavigateToURL(browser(), kInstallUrl);
168 168
169 EXPECT_FALSE(extension_service->extensions()->Contains(kTestExtensionId)); 169 EXPECT_FALSE(extension_service->extensions()->Contains(kTestExtensionId));
170 RunTest("runTest"); 170 RunTest("runTest");
171 EXPECT_TRUE(extension_service->extensions()->Contains(kTestExtensionId)); 171 EXPECT_TRUE(extension_service->extensions()->Contains(kTestExtensionId));
172 } 172 }
173 173
174 class WebstoreStartupInstallerManagedUsersTest 174 class WebstoreStartupInstallerSupervisedUsersTest
175 : public WebstoreStartupInstallerTest { 175 : public WebstoreStartupInstallerTest {
176 public: 176 public:
177 // InProcessBrowserTest overrides: 177 // InProcessBrowserTest overrides:
178 virtual void SetUpCommandLine(base::CommandLine* command_line) OVERRIDE { 178 virtual void SetUpCommandLine(base::CommandLine* command_line) OVERRIDE {
179 WebstoreStartupInstallerTest::SetUpCommandLine(command_line); 179 WebstoreStartupInstallerTest::SetUpCommandLine(command_line);
180 command_line->AppendSwitchASCII(switches::kSupervisedUserId, "asdf"); 180 command_line->AppendSwitchASCII(switches::kSupervisedUserId, "asdf");
181 } 181 }
182 }; 182 };
183 183
184 IN_PROC_BROWSER_TEST_F(WebstoreStartupInstallerManagedUsersTest, 184 IN_PROC_BROWSER_TEST_F(WebstoreStartupInstallerSupervisedUsersTest,
185 InstallProhibited) { 185 InstallProhibited) {
186 #if defined(OS_WIN) && defined(USE_ASH) 186 #if defined(OS_WIN) && defined(USE_ASH)
187 // Disable this test in Metro+Ash for now (http://crbug.com/262796). 187 // Disable this test in Metro+Ash for now (http://crbug.com/262796).
188 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 188 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
189 switches::kAshBrowserTests)) 189 switches::kAshBrowserTests))
190 return; 190 return;
191 #endif 191 #endif
192 192
193 base::CommandLine::ForCurrentProcess()->AppendSwitchASCII( 193 base::CommandLine::ForCurrentProcess()->AppendSwitchASCII(
194 switches::kAppsGalleryInstallAutoConfirmForTests, "accept"); 194 switches::kAppsGalleryInstallAutoConfirmForTests, "accept");
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); 326 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
327 command_line->AppendSwitchASCII( 327 command_line->AppendSwitchASCII(
328 switches::kLimitedInstallFromWebstore, "2"); 328 switches::kLimitedInstallFromWebstore, "2");
329 helper.LimitedInstallFromWebstore(*command_line, browser()->profile(), 329 helper.LimitedInstallFromWebstore(*command_line, browser()->profile(),
330 base::MessageLoop::QuitWhenIdleClosure()); 330 base::MessageLoop::QuitWhenIdleClosure());
331 base::MessageLoop::current()->Run(); 331 base::MessageLoop::current()->Run();
332 332
333 EXPECT_TRUE(saw_install()); 333 EXPECT_TRUE(saw_install());
334 EXPECT_EQ(0, browser_open_count()); 334 EXPECT_EQ(0, browser_open_count());
335 } 335 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/installed_loader.cc ('k') | chrome/browser/profiles/avatar_menu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698