| 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 1003 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1014 ->GetShillManagerClient() | 1014 ->GetShillManagerClient() |
| 1015 ->GetTestInterface() | 1015 ->GetTestInterface() |
| 1016 ->SetupDefaultEnvironment(); | 1016 ->SetupDefaultEnvironment(); |
| 1017 } | 1017 } |
| 1018 | 1018 |
| 1019 void SAMLPolicyTest::SetSAMLOfflineSigninTimeLimitPolicy(int limit) { | 1019 void SAMLPolicyTest::SetSAMLOfflineSigninTimeLimitPolicy(int limit) { |
| 1020 policy::PolicyMap user_policy; | 1020 policy::PolicyMap user_policy; |
| 1021 user_policy.Set(policy::key::kSAMLOfflineSigninTimeLimit, | 1021 user_policy.Set(policy::key::kSAMLOfflineSigninTimeLimit, |
| 1022 policy::POLICY_LEVEL_MANDATORY, policy::POLICY_SCOPE_USER, | 1022 policy::POLICY_LEVEL_MANDATORY, policy::POLICY_SCOPE_USER, |
| 1023 policy::POLICY_SOURCE_CLOUD, | 1023 policy::POLICY_SOURCE_CLOUD, |
| 1024 base::WrapUnique(new base::FundamentalValue(limit)), nullptr); | 1024 base::MakeUnique<base::FundamentalValue>(limit), nullptr); |
| 1025 provider_.UpdateChromePolicy(user_policy); | 1025 provider_.UpdateChromePolicy(user_policy); |
| 1026 base::RunLoop().RunUntilIdle(); | 1026 base::RunLoop().RunUntilIdle(); |
| 1027 } | 1027 } |
| 1028 | 1028 |
| 1029 void SAMLPolicyTest::EnableTransferSAMLCookiesPolicy() { | 1029 void SAMLPolicyTest::EnableTransferSAMLCookiesPolicy() { |
| 1030 em::ChromeDeviceSettingsProto& proto(device_policy_->payload()); | 1030 em::ChromeDeviceSettingsProto& proto(device_policy_->payload()); |
| 1031 proto.mutable_saml_settings()->set_transfer_saml_cookies(true); | 1031 proto.mutable_saml_settings()->set_transfer_saml_cookies(true); |
| 1032 | 1032 |
| 1033 base::RunLoop run_loop; | 1033 base::RunLoop run_loop; |
| 1034 std::unique_ptr<CrosSettings::ObserverSubscription> observer = | 1034 std::unique_ptr<CrosSettings::ObserverSubscription> observer = |
| (...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1360 | 1360 |
| 1361 // Scraping one password should finish login. | 1361 // Scraping one password should finish login. |
| 1362 content::WindowedNotificationObserver session_start_waiter( | 1362 content::WindowedNotificationObserver session_start_waiter( |
| 1363 chrome::NOTIFICATION_SESSION_STARTED, | 1363 chrome::NOTIFICATION_SESSION_STARTED, |
| 1364 content::NotificationService::AllSources()); | 1364 content::NotificationService::AllSources()); |
| 1365 ExecuteJsInSigninFrame("document.getElementById('Submit').click();"); | 1365 ExecuteJsInSigninFrame("document.getElementById('Submit').click();"); |
| 1366 session_start_waiter.Wait(); | 1366 session_start_waiter.Wait(); |
| 1367 } | 1367 } |
| 1368 | 1368 |
| 1369 } // namespace chromeos | 1369 } // namespace chromeos |
| OLD | NEW |