| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 <memory> | 5 #include <memory> |
| 6 #include <utility> | 6 #include <utility> |
| 7 | 7 |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
| (...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 466 | 466 |
| 467 TEST_F(AccountReconcilorTest, StartReconcileContentSettingsInvalidPattern) { | 467 TEST_F(AccountReconcilorTest, StartReconcileContentSettingsInvalidPattern) { |
| 468 const std::string account_id = | 468 const std::string account_id = |
| 469 ConnectProfileToAccount("12345", "user@gmail.com"); | 469 ConnectProfileToAccount("12345", "user@gmail.com"); |
| 470 token_service()->UpdateCredentials(account_id, "refresh_token"); | 470 token_service()->UpdateCredentials(account_id, "refresh_token"); |
| 471 | 471 |
| 472 AccountReconcilor* reconcilor = | 472 AccountReconcilor* reconcilor = |
| 473 AccountReconcilorFactory::GetForProfile(profile()); | 473 AccountReconcilorFactory::GetForProfile(profile()); |
| 474 ASSERT_TRUE(reconcilor); | 474 ASSERT_TRUE(reconcilor); |
| 475 | 475 |
| 476 std::unique_ptr<ContentSettingsPattern::BuilderInterface> builder( | 476 auto builder = ContentSettingsPattern::CreateBuilder(); |
| 477 ContentSettingsPattern::CreateBuilder(false)); | |
| 478 builder->Invalid(); | 477 builder->Invalid(); |
| 479 | 478 |
| 480 SimulateCookieContentSettingsChanged(reconcilor, builder->Build()); | 479 SimulateCookieContentSettingsChanged(reconcilor, builder->Build()); |
| 481 ASSERT_TRUE(reconcilor->is_reconcile_started_); | 480 ASSERT_TRUE(reconcilor->is_reconcile_started_); |
| 482 } | 481 } |
| 483 | 482 |
| 484 // This test is needed until chrome changes to use gaia obfuscated id. | 483 // This test is needed until chrome changes to use gaia obfuscated id. |
| 485 // The signin manager and token service use the gaia "email" property, which | 484 // The signin manager and token service use the gaia "email" property, which |
| 486 // preserves dots in usernames and preserves case. gaia::ParseListAccountsData() | 485 // preserves dots in usernames and preserves case. gaia::ParseListAccountsData() |
| 487 // however uses gaia "displayEmail" which does not preserve case, and then | 486 // however uses gaia "displayEmail" which does not preserve case, and then |
| (...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 894 reconcilor->StartReconcile(); | 893 reconcilor->StartReconcile(); |
| 895 base::RunLoop().RunUntilIdle(); | 894 base::RunLoop().RunUntilIdle(); |
| 896 ASSERT_TRUE(reconcilor->is_reconcile_started_); | 895 ASSERT_TRUE(reconcilor->is_reconcile_started_); |
| 897 | 896 |
| 898 SimulateAddAccountToCookieCompleted( | 897 SimulateAddAccountToCookieCompleted( |
| 899 reconcilor, account_id1, GoogleServiceAuthError::AuthErrorNone()); | 898 reconcilor, account_id1, GoogleServiceAuthError::AuthErrorNone()); |
| 900 base::RunLoop().RunUntilIdle(); | 899 base::RunLoop().RunUntilIdle(); |
| 901 ASSERT_FALSE(reconcilor->is_reconcile_started_); | 900 ASSERT_FALSE(reconcilor->is_reconcile_started_); |
| 902 ASSERT_FALSE(reconcilor->error_during_last_reconcile_); | 901 ASSERT_FALSE(reconcilor->error_during_last_reconcile_); |
| 903 } | 902 } |
| OLD | NEW |