| 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 "chrome/browser/ui/sync/one_click_signin_sync_starter.h" | 5 #include "chrome/browser/ui/sync/one_click_signin_sync_starter.h" |
| 6 | 6 |
| 7 #include <memory> | |
| 8 | |
| 9 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 10 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 11 #include "base/macros.h" | |
| 12 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
| 13 #include "chrome/browser/signin/account_tracker_service_factory.h" | 10 #include "chrome/browser/signin/account_tracker_service_factory.h" |
| 14 #include "chrome/browser/signin/chrome_signin_client_factory.h" | 11 #include "chrome/browser/signin/chrome_signin_client_factory.h" |
| 15 #include "chrome/browser/signin/gaia_cookie_manager_service_factory.h" | 12 #include "chrome/browser/signin/gaia_cookie_manager_service_factory.h" |
| 16 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" | 13 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" |
| 17 #include "chrome/browser/signin/signin_manager_factory.h" | 14 #include "chrome/browser/signin/signin_manager_factory.h" |
| 18 #include "chrome/common/chrome_switches.h" | 15 #include "chrome/common/chrome_switches.h" |
| 19 #include "chrome/test/base/chrome_render_view_host_test_harness.h" | 16 #include "chrome/test/base/chrome_render_view_host_test_harness.h" |
| 20 #include "chrome/test/base/testing_profile.h" | 17 #include "chrome/test/base/testing_profile.h" |
| 21 #include "components/browser_sync/browser_sync_switches.h" | 18 #include "components/browser_sync/browser_sync_switches.h" |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 | 139 |
| 143 const GURL kTestURL = GURL("http://www.example.com"); | 140 const GURL kTestURL = GURL("http://www.example.com"); |
| 144 CreateSyncStarter(base::Bind(&OneClickSigninSyncStarterTest::Callback, | 141 CreateSyncStarter(base::Bind(&OneClickSigninSyncStarterTest::Callback, |
| 145 base::Unretained(this)), | 142 base::Unretained(this)), |
| 146 kTestURL); | 143 kTestURL); |
| 147 sync_starter_->AccountAddedToCookie( | 144 sync_starter_->AccountAddedToCookie( |
| 148 GoogleServiceAuthError(GoogleServiceAuthError::NONE)); | 145 GoogleServiceAuthError(GoogleServiceAuthError::NONE)); |
| 149 EXPECT_EQ(1, succeeded_count_); | 146 EXPECT_EQ(1, succeeded_count_); |
| 150 EXPECT_EQ(kTestURL, controller.GetPendingEntry()->GetURL()); | 147 EXPECT_EQ(kTestURL, controller.GetPendingEntry()->GetURL()); |
| 151 } | 148 } |
| OLD | NEW |