OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <cstring> | 5 #include <cstring> |
6 #include <memory> | 6 #include <memory> |
7 #include <string> | 7 #include <string> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 997 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1008 // Set up fake networks. | 1008 // Set up fake networks. |
1009 DBusThreadManager::Get() | 1009 DBusThreadManager::Get() |
1010 ->GetShillManagerClient() | 1010 ->GetShillManagerClient() |
1011 ->GetTestInterface() | 1011 ->GetTestInterface() |
1012 ->SetupDefaultEnvironment(); | 1012 ->SetupDefaultEnvironment(); |
1013 } | 1013 } |
1014 | 1014 |
1015 void SAMLPolicyTest::SetSAMLOfflineSigninTimeLimitPolicy(int limit) { | 1015 void SAMLPolicyTest::SetSAMLOfflineSigninTimeLimitPolicy(int limit) { |
1016 policy::PolicyMap user_policy; | 1016 policy::PolicyMap user_policy; |
1017 user_policy.Set(policy::key::kSAMLOfflineSigninTimeLimit, | 1017 user_policy.Set(policy::key::kSAMLOfflineSigninTimeLimit, |
1018 policy::POLICY_LEVEL_MANDATORY, | 1018 policy::POLICY_LEVEL_MANDATORY, policy::POLICY_SCOPE_USER, |
1019 policy::POLICY_SCOPE_USER, | |
1020 policy::POLICY_SOURCE_CLOUD, | 1019 policy::POLICY_SOURCE_CLOUD, |
1021 new base::FundamentalValue(limit), | 1020 base::WrapUnique(new base::FundamentalValue(limit)), nullptr); |
1022 NULL); | |
1023 provider_.UpdateChromePolicy(user_policy); | 1021 provider_.UpdateChromePolicy(user_policy); |
1024 base::RunLoop().RunUntilIdle(); | 1022 base::RunLoop().RunUntilIdle(); |
1025 } | 1023 } |
1026 | 1024 |
1027 void SAMLPolicyTest::EnableTransferSAMLCookiesPolicy() { | 1025 void SAMLPolicyTest::EnableTransferSAMLCookiesPolicy() { |
1028 em::ChromeDeviceSettingsProto& proto(device_policy_->payload()); | 1026 em::ChromeDeviceSettingsProto& proto(device_policy_->payload()); |
1029 proto.mutable_saml_settings()->set_transfer_saml_cookies(true); | 1027 proto.mutable_saml_settings()->set_transfer_saml_cookies(true); |
1030 | 1028 |
1031 base::RunLoop run_loop; | 1029 base::RunLoop run_loop; |
1032 std::unique_ptr<CrosSettings::ObserverSubscription> observer = | 1030 std::unique_ptr<CrosSettings::ObserverSubscription> observer = |
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1363 chrome::NOTIFICATION_SESSION_STARTED, | 1361 chrome::NOTIFICATION_SESSION_STARTED, |
1364 content::NotificationService::AllSources()); | 1362 content::NotificationService::AllSources()); |
1365 | 1363 |
1366 OobeScreenWaiter(OobeScreen::SCREEN_CONFIRM_PASSWORD).Wait(); | 1364 OobeScreenWaiter(OobeScreen::SCREEN_CONFIRM_PASSWORD).Wait(); |
1367 SendConfirmPassword("fake_password"); | 1365 SendConfirmPassword("fake_password"); |
1368 // Login should finish login and a session should start. | 1366 // Login should finish login and a session should start. |
1369 session_start_waiter.Wait(); | 1367 session_start_waiter.Wait(); |
1370 } | 1368 } |
1371 | 1369 |
1372 } // namespace chromeos | 1370 } // namespace chromeos |
OLD | NEW |