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 std::unique_ptr<ContentSettingsPattern::BuilderInterface> builder = |
477 ContentSettingsPattern::CreateBuilder(false)); | 477 ContentSettingsPattern::CreateBuilder(); |
478 builder->Invalid(); | 478 builder->Invalid(); |
479 | 479 |
480 SimulateCookieContentSettingsChanged(reconcilor, builder->Build()); | 480 SimulateCookieContentSettingsChanged(reconcilor, builder->Build()); |
481 ASSERT_TRUE(reconcilor->is_reconcile_started_); | 481 ASSERT_TRUE(reconcilor->is_reconcile_started_); |
482 } | 482 } |
483 | 483 |
484 // This test is needed until chrome changes to use gaia obfuscated id. | 484 // 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 | 485 // The signin manager and token service use the gaia "email" property, which |
486 // preserves dots in usernames and preserves case. gaia::ParseListAccountsData() | 486 // preserves dots in usernames and preserves case. gaia::ParseListAccountsData() |
487 // however uses gaia "displayEmail" which does not preserve case, and then | 487 // 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(); | 894 reconcilor->StartReconcile(); |
895 base::RunLoop().RunUntilIdle(); | 895 base::RunLoop().RunUntilIdle(); |
896 ASSERT_TRUE(reconcilor->is_reconcile_started_); | 896 ASSERT_TRUE(reconcilor->is_reconcile_started_); |
897 | 897 |
898 SimulateAddAccountToCookieCompleted( | 898 SimulateAddAccountToCookieCompleted( |
899 reconcilor, account_id1, GoogleServiceAuthError::AuthErrorNone()); | 899 reconcilor, account_id1, GoogleServiceAuthError::AuthErrorNone()); |
900 base::RunLoop().RunUntilIdle(); | 900 base::RunLoop().RunUntilIdle(); |
901 ASSERT_FALSE(reconcilor->is_reconcile_started_); | 901 ASSERT_FALSE(reconcilor->is_reconcile_started_); |
902 ASSERT_FALSE(reconcilor->error_during_last_reconcile_); | 902 ASSERT_FALSE(reconcilor->error_during_last_reconcile_); |
903 } | 903 } |
OLD | NEW |