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 "base/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/memory/scoped_ptr.h" | 6 #include "base/memory/scoped_ptr.h" |
7 #include "base/run_loop.h" | 7 #include "base/run_loop.h" |
8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
9 #include "base/test/histogram_tester.h" | 9 #include "base/test/histogram_tester.h" |
10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 SigninClient* client) | 72 SigninClient* client) |
73 : testing::StrictMock<AccountReconcilor>(token_service, | 73 : testing::StrictMock<AccountReconcilor>(token_service, |
74 signin_manager, | 74 signin_manager, |
75 client) {} | 75 client) {} |
76 | 76 |
77 } // namespace | 77 } // namespace |
78 | 78 |
79 class AccountReconcilorTest : public ::testing::TestWithParam<bool> { | 79 class AccountReconcilorTest : public ::testing::TestWithParam<bool> { |
80 public: | 80 public: |
81 AccountReconcilorTest(); | 81 AccountReconcilorTest(); |
82 virtual void SetUp() override; | 82 void SetUp() override; |
83 | 83 |
84 TestingProfile* profile() { return profile_; } | 84 TestingProfile* profile() { return profile_; } |
85 FakeSigninManagerForTesting* signin_manager() { return signin_manager_; } | 85 FakeSigninManagerForTesting* signin_manager() { return signin_manager_; } |
86 FakeProfileOAuth2TokenService* token_service() { return token_service_; } | 86 FakeProfileOAuth2TokenService* token_service() { return token_service_; } |
87 base::HistogramTester* histogram_tester() { return &histogram_tester_; } | 87 base::HistogramTester* histogram_tester() { return &histogram_tester_; } |
88 | 88 |
89 void SetFakeResponse(const std::string& url, | 89 void SetFakeResponse(const std::string& url, |
90 const std::string& data, | 90 const std::string& data, |
91 net::HttpStatusCode code, | 91 net::HttpStatusCode code, |
92 net::URLRequestStatus::Status status) { | 92 net::URLRequestStatus::Status status) { |
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
601 | 601 |
602 SimulateMergeSessionCompleted(reconcilor, "user@gmail.com", | 602 SimulateMergeSessionCompleted(reconcilor, "user@gmail.com", |
603 GoogleServiceAuthError::AuthErrorNone()); | 603 GoogleServiceAuthError::AuthErrorNone()); |
604 ASSERT_FALSE(reconcilor->is_reconcile_started_); | 604 ASSERT_FALSE(reconcilor->is_reconcile_started_); |
605 } | 605 } |
606 | 606 |
607 INSTANTIATE_TEST_CASE_P(AccountReconcilorMaybeEnabled, | 607 INSTANTIATE_TEST_CASE_P(AccountReconcilorMaybeEnabled, |
608 AccountReconcilorTest, | 608 AccountReconcilorTest, |
609 testing::Bool()); | 609 testing::Bool()); |
610 | 610 |
OLD | NEW |