| 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 "chrome/browser/chromeos/login/profile_auth_data.h" | 5 #include "chrome/browser/chromeos/login/profile_auth_data.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 } | 171 } |
| 172 | 172 |
| 173 void ProfileAuthDataTest::VerifyUserCookies( | 173 void ProfileAuthDataTest::VerifyUserCookies( |
| 174 const std::string& expected_gaia_cookie_value, | 174 const std::string& expected_gaia_cookie_value, |
| 175 const std::string& expected_saml_idp_cookie_value) { | 175 const std::string& expected_saml_idp_cookie_value) { |
| 176 net::CookieList user_cookies = GetUserCookies(); | 176 net::CookieList user_cookies = GetUserCookies(); |
| 177 ASSERT_EQ(2u, user_cookies.size()); | 177 ASSERT_EQ(2u, user_cookies.size()); |
| 178 net::CanonicalCookie* cookie = &user_cookies[0]; | 178 net::CanonicalCookie* cookie = &user_cookies[0]; |
| 179 // kSAMLIdPCookieURL is returned first because it was created first, so has | 179 // kSAMLIdPCookieURL is returned first because it was created first, so has |
| 180 // the earliest creation date. | 180 // the earliest creation date. |
| 181 EXPECT_EQ(GURL(kSAMLIdPCookieURL), cookie->Source()); | |
| 182 EXPECT_EQ(kCookieName, cookie->Name()); | 181 EXPECT_EQ(kCookieName, cookie->Name()); |
| 183 EXPECT_EQ(expected_saml_idp_cookie_value, cookie->Value()); | 182 EXPECT_EQ(expected_saml_idp_cookie_value, cookie->Value()); |
| 184 EXPECT_EQ(kSAMLIdPCookieDomain, cookie->Domain()); | 183 EXPECT_EQ(kSAMLIdPCookieDomain, cookie->Domain()); |
| 185 cookie = &user_cookies[1]; | 184 cookie = &user_cookies[1]; |
| 186 EXPECT_EQ(GURL(kGAIACookieURL), cookie->Source()); | |
| 187 EXPECT_EQ(kCookieName, cookie->Name()); | 185 EXPECT_EQ(kCookieName, cookie->Name()); |
| 188 EXPECT_EQ(expected_gaia_cookie_value, cookie->Value()); | 186 EXPECT_EQ(expected_gaia_cookie_value, cookie->Value()); |
| 189 EXPECT_EQ(kGAIACookieDomain, cookie->Domain()); | 187 EXPECT_EQ(kGAIACookieDomain, cookie->Domain()); |
| 190 } | 188 } |
| 191 | 189 |
| 192 void ProfileAuthDataTest::VerifyUserChannelID( | 190 void ProfileAuthDataTest::VerifyUserChannelID( |
| 193 crypto::ECPrivateKey* expected_key) { | 191 crypto::ECPrivateKey* expected_key) { |
| 194 net::ChannelIDStore::ChannelIDList user_channel_ids = GetUserChannelIDs(); | 192 net::ChannelIDStore::ChannelIDList user_channel_ids = GetUserChannelIDs(); |
| 195 ASSERT_EQ(1u, user_channel_ids.size()); | 193 ASSERT_EQ(1u, user_channel_ids.size()); |
| 196 net::ChannelIDStore::ChannelID* channel_id = &user_channel_ids.front(); | 194 net::ChannelIDStore::ChannelID* channel_id = &user_channel_ids.front(); |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 316 PopulateUserBrowserContext(); | 314 PopulateUserBrowserContext(); |
| 317 | 315 |
| 318 Transfer(false, true); | 316 Transfer(false, true); |
| 319 | 317 |
| 320 VerifyTransferredUserProxyAuthEntry(); | 318 VerifyTransferredUserProxyAuthEntry(); |
| 321 VerifyUserCookies(kCookieValue2, kCookieValue1); | 319 VerifyUserCookies(kCookieValue2, kCookieValue1); |
| 322 VerifyUserChannelID(channel_id_key2_.get()); | 320 VerifyUserChannelID(channel_id_key2_.get()); |
| 323 } | 321 } |
| 324 | 322 |
| 325 } // namespace chromeos | 323 } // namespace chromeos |
| OLD | NEW |