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

Unified Diff: chrome/browser/extensions/webstore_startup_installer_browsertest.cc

Issue 23868042: Mark supervised profiles as such immediately when they're created. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/webstore_startup_installer_browsertest.cc
diff --git a/chrome/browser/extensions/webstore_startup_installer_browsertest.cc b/chrome/browser/extensions/webstore_startup_installer_browsertest.cc
index 24de7602504e444eb880c4eb310b9dd2ca509d44..0451bbc9d90fff97e26f4d672ade2a4984e80b79 100644
--- a/chrome/browser/extensions/webstore_startup_installer_browsertest.cc
+++ b/chrome/browser/extensions/webstore_startup_installer_browsertest.cc
@@ -171,8 +171,18 @@ IN_PROC_BROWSER_TEST_F(WebstoreStartupInstallerTest, InstallFromHostedApp) {
EXPECT_TRUE(extension_service->extensions()->Contains(kTestExtensionId));
}
-IN_PROC_BROWSER_TEST_F(WebstoreStartupInstallerTest,
- InstallProhibitedForManagedUsers) {
+class WebstoreStartupInstallerManagedUsersTest
+ : public WebstoreStartupInstallerTest {
+ public:
+ // InProcessBrowserTest overrides:
+ virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
+ WebstoreStartupInstallerTest::SetUpCommandLine(command_line);
+ command_line->AppendSwitch(switches::kNewProfileIsSupervised);
+ }
+};
+
+IN_PROC_BROWSER_TEST_F(WebstoreStartupInstallerManagedUsersTest,
+ InstallProhibited) {
#if defined(OS_WIN) && defined(USE_ASH)
// Disable this test in Metro+Ash for now (http://crbug.com/262796).
if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAshBrowserTests))
@@ -182,11 +192,6 @@ IN_PROC_BROWSER_TEST_F(WebstoreStartupInstallerTest,
CommandLine::ForCurrentProcess()->AppendSwitchASCII(
switches::kAppsGalleryInstallAutoConfirmForTests, "accept");
- // Make the profile managed such that no extension installs are allowed.
- ManagedUserService* service =
- ManagedUserServiceFactory::GetForProfile(browser()->profile());
- service->InitForTesting();
-
ui_test_utils::NavigateToURL(
browser(), GenerateTestServerUrl(kAppDomain, "install_prohibited.html"));
« no previous file with comments | « chrome/browser/extensions/extension_service_unittest.cc ('k') | chrome/browser/managed_mode/managed_mode_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698