| 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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 AccountReconcilorTest::AccountReconcilorTest() | 123 AccountReconcilorTest::AccountReconcilorTest() |
| 124 : signin_manager_(NULL), | 124 : signin_manager_(NULL), |
| 125 token_service_(NULL), | 125 token_service_(NULL), |
| 126 mock_reconcilor_(NULL), | 126 mock_reconcilor_(NULL), |
| 127 url_fetcher_factory_(NULL) {} | 127 url_fetcher_factory_(NULL) {} |
| 128 | 128 |
| 129 void AccountReconcilorTest::SetUp() { | 129 void AccountReconcilorTest::SetUp() { |
| 130 // If it's a non-parameterized test, or we have a parameter of true, set flag. | 130 // If it's a non-parameterized test, or we have a parameter of true, set flag. |
| 131 if (!::testing::UnitTest::GetInstance()->current_test_info()->value_param() || | 131 if (!::testing::UnitTest::GetInstance()->current_test_info()->value_param() || |
| 132 GetParam()) { | 132 GetParam()) { |
| 133 CommandLine::ForCurrentProcess()->AppendSwitch( | 133 base::CommandLine::ForCurrentProcess()->AppendSwitch( |
| 134 switches::kEnableNewProfileManagement); | 134 switches::kEnableNewProfileManagement); |
| 135 } | 135 } |
| 136 | 136 |
| 137 list_accounts_url_ = GaiaUrls::GetInstance()->ListAccountsURLWithSource( | 137 list_accounts_url_ = GaiaUrls::GetInstance()->ListAccountsURLWithSource( |
| 138 GaiaConstants::kReconcilorSource); | 138 GaiaConstants::kReconcilorSource); |
| 139 get_check_connection_info_url_ = | 139 get_check_connection_info_url_ = |
| 140 GaiaUrls::GetInstance()->GetCheckConnectionInfoURLWithSource( | 140 GaiaUrls::GetInstance()->GetCheckConnectionInfoURLWithSource( |
| 141 GaiaConstants::kReconcilorSource); | 141 GaiaConstants::kReconcilorSource); |
| 142 | 142 |
| 143 SetFakeResponse(get_check_connection_info_url().spec(), "[]", | 143 SetFakeResponse(get_check_connection_info_url().spec(), "[]", |
| (...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 610 ASSERT_TRUE(reconcilor->is_reconcile_started_); | 610 ASSERT_TRUE(reconcilor->is_reconcile_started_); |
| 611 | 611 |
| 612 SimulateMergeSessionCompleted(reconcilor, "user@gmail.com", | 612 SimulateMergeSessionCompleted(reconcilor, "user@gmail.com", |
| 613 GoogleServiceAuthError::AuthErrorNone()); | 613 GoogleServiceAuthError::AuthErrorNone()); |
| 614 ASSERT_FALSE(reconcilor->is_reconcile_started_); | 614 ASSERT_FALSE(reconcilor->is_reconcile_started_); |
| 615 } | 615 } |
| 616 | 616 |
| 617 INSTANTIATE_TEST_CASE_P(AccountReconcilorMaybeEnabled, | 617 INSTANTIATE_TEST_CASE_P(AccountReconcilorMaybeEnabled, |
| 618 AccountReconcilorTest, | 618 AccountReconcilorTest, |
| 619 testing::Bool()); | 619 testing::Bool()); |
| OLD | NEW |