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 <string> | 6 #include <string> |
7 | 7 |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 969 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
980 ->GetShillManagerClient() | 980 ->GetShillManagerClient() |
981 ->GetTestInterface() | 981 ->GetTestInterface() |
982 ->SetupDefaultEnvironment(); | 982 ->SetupDefaultEnvironment(); |
983 } | 983 } |
984 | 984 |
985 void SAMLPolicyTest::SetSAMLOfflineSigninTimeLimitPolicy(int limit) { | 985 void SAMLPolicyTest::SetSAMLOfflineSigninTimeLimitPolicy(int limit) { |
986 policy::PolicyMap user_policy; | 986 policy::PolicyMap user_policy; |
987 user_policy.Set(policy::key::kSAMLOfflineSigninTimeLimit, | 987 user_policy.Set(policy::key::kSAMLOfflineSigninTimeLimit, |
988 policy::POLICY_LEVEL_MANDATORY, | 988 policy::POLICY_LEVEL_MANDATORY, |
989 policy::POLICY_SCOPE_USER, | 989 policy::POLICY_SCOPE_USER, |
| 990 policy::POLICY_SOURCE_CLOUD, |
990 new base::FundamentalValue(limit), | 991 new base::FundamentalValue(limit), |
991 NULL); | 992 NULL); |
992 provider_.UpdateChromePolicy(user_policy); | 993 provider_.UpdateChromePolicy(user_policy); |
993 base::RunLoop().RunUntilIdle(); | 994 base::RunLoop().RunUntilIdle(); |
994 } | 995 } |
995 | 996 |
996 void SAMLPolicyTest::EnableTransferSAMLCookiesPolicy() { | 997 void SAMLPolicyTest::EnableTransferSAMLCookiesPolicy() { |
997 em::ChromeDeviceSettingsProto& proto(device_policy_->payload()); | 998 em::ChromeDeviceSettingsProto& proto(device_policy_->payload()); |
998 proto.mutable_saml_settings()->set_transfer_saml_cookies(true); | 999 proto.mutable_saml_settings()->set_transfer_saml_cookies(true); |
999 | 1000 |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1218 kTestAuthLSIDCookie1); | 1219 kTestAuthLSIDCookie1); |
1219 | 1220 |
1220 GetCookies(); | 1221 GetCookies(); |
1221 EXPECT_EQ(kTestAuthSIDCookie1, GetCookieValue(kGAIASIDCookieName)); | 1222 EXPECT_EQ(kTestAuthSIDCookie1, GetCookieValue(kGAIASIDCookieName)); |
1222 EXPECT_EQ(kTestAuthLSIDCookie1, GetCookieValue(kGAIALSIDCookieName)); | 1223 EXPECT_EQ(kTestAuthLSIDCookie1, GetCookieValue(kGAIALSIDCookieName)); |
1223 EXPECT_EQ(kSAMLIdPCookieValue1, GetCookieValue(kSAMLIdPCookieName)); | 1224 EXPECT_EQ(kSAMLIdPCookieValue1, GetCookieValue(kSAMLIdPCookieName)); |
1224 } | 1225 } |
1225 | 1226 |
1226 | 1227 |
1227 } // namespace chromeos | 1228 } // namespace chromeos |
OLD | NEW |