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

Unified Diff: chrome/browser/chromeos/login/kiosk_browsertest.cc

Issue 258743005: Enable Enterprise enrollment on desktop builds. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: added arg to PathService::OverrideAndCreateIfNeeded, added test for FakeCryptohomeClient::InstallAt… Created 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/login/kiosk_browsertest.cc
diff --git a/chrome/browser/chromeos/login/kiosk_browsertest.cc b/chrome/browser/chromeos/login/kiosk_browsertest.cc
index 728920387ecd0a0f10f59230b611556410b02f4d..6d7a05eec7ec16157798080a468e9631703a0255 100644
--- a/chrome/browser/chromeos/login/kiosk_browsertest.cc
+++ b/chrome/browser/chromeos/login/kiosk_browsertest.cc
@@ -849,15 +849,6 @@ IN_PROC_BROWSER_TEST_F(KioskTest, KioskEnableAbortedWithAutoEnrollment) {
}
IN_PROC_BROWSER_TEST_F(KioskTest, KioskEnableAfter2ndSigninScreen) {
- // Fake an auto enrollment is not going to be enforced.
- CommandLine::ForCurrentProcess()->AppendSwitchASCII(
- switches::kEnterpriseEnrollmentInitialModulus, "1");
- CommandLine::ForCurrentProcess()->AppendSwitchASCII(
- switches::kEnterpriseEnrollmentModulusLimit, "2");
- g_browser_process->local_state()->SetBoolean(prefs::kShouldAutoEnroll, false);
- g_browser_process->local_state()->SetInteger(
- prefs::kAutoEnrollmentPowerLimit, -1);
-
chromeos::WizardController::SkipPostLoginScreensForTesting();
chromeos::WizardController* wizard_controller =
chromeos::WizardController::default_controller();
@@ -1123,9 +1114,13 @@ class KioskEnterpriseTest : public KioskTest {
device_policy_test_helper_.device_policy()->policy_data();
policy_data.set_service_account_identity(kTestEnterpriseServiceAccountId);
device_policy_test_helper_.device_policy()->Build();
+
+ base::RunLoop run_loop;
DBusThreadManager::Get()->GetSessionManagerClient()->StoreDevicePolicy(
device_policy_test_helper_.device_policy()->GetBlob(),
- base::Bind(&KioskEnterpriseTest::StorePolicyCallback));
+ base::Bind(&KioskEnterpriseTest::StorePolicyCallback,
+ run_loop.QuitClosure()));
+ run_loop.Run();
DeviceSettingsService::Get()->Load();
@@ -1164,8 +1159,9 @@ class KioskEnterpriseTest : public KioskTest {
base::RunLoop().RunUntilIdle();
}
- static void StorePolicyCallback(bool result) {
+ static void StorePolicyCallback(const base::Closure& callback, bool result) {
ASSERT_TRUE(result);
+ callback.Run();
}
policy::DevicePolicyCrosTestHelper device_policy_test_helper_;

Powered by Google App Engine
This is Rietveld 408576698