| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_observer.h" | 5 #include "chrome/browser/ui/sync/one_click_signin_sync_observer.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| 11 #include "base/callback.h" | 11 #include "base/callback.h" |
| 12 #include "base/macros.h" | 12 #include "base/macros.h" |
| 13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 14 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" | 14 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" |
| 15 #include "chrome/browser/signin/signin_manager_factory.h" | 15 #include "chrome/browser/signin/signin_manager_factory.h" |
| 16 #include "chrome/browser/signin/signin_promo.h" | 16 #include "chrome/browser/signin/signin_promo.h" |
| 17 #include "chrome/browser/sync/profile_sync_service_factory.h" | 17 #include "chrome/browser/sync/profile_sync_service_factory.h" |
| 18 #include "chrome/browser/sync/profile_sync_test_util.h" | 18 #include "chrome/browser/sync/profile_sync_test_util.h" |
| 19 #include "chrome/browser/sync/test_profile_sync_service.h" | |
| 20 #include "chrome/test/base/chrome_render_view_host_test_harness.h" | 19 #include "chrome/test/base/chrome_render_view_host_test_harness.h" |
| 21 #include "chrome/test/base/testing_profile.h" | 20 #include "chrome/test/base/testing_profile.h" |
| 21 #include "components/browser_sync/browser/test_profile_sync_service.h" |
| 22 #include "components/signin/core/browser/signin_manager.h" | 22 #include "components/signin/core/browser/signin_manager.h" |
| 23 #include "components/sync_driver/startup_controller.h" | 23 #include "components/sync_driver/startup_controller.h" |
| 24 #include "content/public/browser/render_frame_host.h" | 24 #include "content/public/browser/render_frame_host.h" |
| 25 #include "content/public/browser/web_contents.h" | 25 #include "content/public/browser/web_contents.h" |
| 26 #include "content/public/test/test_utils.h" | 26 #include "content/public/test/test_utils.h" |
| 27 #include "testing/gmock/include/gmock/gmock.h" | 27 #include "testing/gmock/include/gmock/gmock.h" |
| 28 #include "testing/gtest/include/gtest/gtest.h" | 28 #include "testing/gtest/include/gtest/gtest.h" |
| 29 | 29 |
| 30 using testing::_; | 30 using testing::_; |
| 31 | 31 |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 signin_metrics::Reason::REASON_SIGNIN_PRIMARY_ACCOUNT, false); | 247 signin_metrics::Reason::REASON_SIGNIN_PRIMARY_ACCOUNT, false); |
| 248 CreateSyncObserver(continue_url.spec()); | 248 CreateSyncObserver(continue_url.spec()); |
| 249 sync_service_->set_first_setup_in_progress(false); | 249 sync_service_->set_first_setup_in_progress(false); |
| 250 sync_service_->set_sync_active(true); | 250 sync_service_->set_sync_active(true); |
| 251 | 251 |
| 252 EXPECT_CALL(*web_contents_observer_, | 252 EXPECT_CALL(*web_contents_observer_, |
| 253 DidStartNavigationToPendingEntry(_, _)).Times(0); | 253 DidStartNavigationToPendingEntry(_, _)).Times(0); |
| 254 sync_service_->NotifyObservers(); | 254 sync_service_->NotifyObservers(); |
| 255 EXPECT_NE(GURL(kContinueUrl), web_contents()->GetVisibleURL()); | 255 EXPECT_NE(GURL(kContinueUrl), web_contents()->GetVisibleURL()); |
| 256 } | 256 } |
| OLD | NEW |