OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/files/file_util.h" | 8 #include "base/files/file_util.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "base/threading/thread_task_runner_handle.h" | 10 #include "base/threading/thread_task_runner_handle.h" |
11 #include "build/build_config.h" | 11 #include "build/build_config.h" |
12 #include "components/browser_sync/browser/profile_sync_service.h" | 12 #include "components/browser_sync/browser/profile_sync_service.h" |
13 #include "components/browser_sync/browser/profile_sync_test_util.h" | 13 #include "components/browser_sync/browser/profile_sync_test_util.h" |
14 #include "components/prefs/pref_service.h" | 14 #include "components/prefs/pref_service.h" |
15 #include "components/signin/core/browser/account_tracker_service.h" | 15 #include "components/signin/core/browser/account_tracker_service.h" |
16 #include "components/signin/core/browser/fake_profile_oauth2_token_service.h" | 16 #include "components/signin/core/browser/fake_profile_oauth2_token_service.h" |
17 #include "components/signin/core/browser/profile_oauth2_token_service.h" | 17 #include "components/signin/core/browser/profile_oauth2_token_service.h" |
18 #include "components/signin/core/browser/signin_manager.h" | 18 #include "components/signin/core/browser/signin_manager.h" |
19 #include "components/signin/core/common/signin_pref_names.h" | 19 #include "components/signin/core/common/signin_pref_names.h" |
20 #include "components/sync_driver/data_type_manager.h" | 20 #include "components/sync/driver/data_type_manager.h" |
21 #include "components/sync_driver/data_type_manager_mock.h" | 21 #include "components/sync/driver/data_type_manager_mock.h" |
22 #include "components/sync_driver/fake_data_type_controller.h" | 22 #include "components/sync/driver/fake_data_type_controller.h" |
23 #include "components/sync_driver/glue/sync_backend_host_mock.h" | 23 #include "components/sync/driver/glue/sync_backend_host_mock.h" |
24 #include "components/sync_driver/pref_names.h" | 24 #include "components/sync/driver/pref_names.h" |
25 #include "components/sync_driver/sync_api_component_factory_mock.h" | 25 #include "components/sync/driver/sync_api_component_factory_mock.h" |
26 #include "components/sync_driver/sync_prefs.h" | 26 #include "components/sync/driver/sync_prefs.h" |
27 #include "components/sync_driver/sync_service_observer.h" | 27 #include "components/sync/driver/sync_service_observer.h" |
28 #include "components/syncable_prefs/pref_service_syncable.h" | 28 #include "components/syncable_prefs/pref_service_syncable.h" |
29 #include "google_apis/gaia/gaia_auth_consumer.h" | 29 #include "google_apis/gaia/gaia_auth_consumer.h" |
30 #include "google_apis/gaia/gaia_constants.h" | 30 #include "google_apis/gaia/gaia_constants.h" |
31 #include "google_apis/gaia/oauth2_token_service.h" | 31 #include "google_apis/gaia/oauth2_token_service.h" |
32 #include "net/url_request/url_request_test_util.h" | 32 #include "net/url_request/url_request_test_util.h" |
33 #include "testing/gmock/include/gmock/gmock.h" | 33 #include "testing/gmock/include/gmock/gmock.h" |
34 #include "testing/gtest/include/gtest/gtest.h" | 34 #include "testing/gtest/include/gtest/gtest.h" |
35 | 35 |
36 using browser_sync::SyncBackendHostMock; | 36 using browser_sync::SyncBackendHostMock; |
37 using sync_driver::DataTypeManager; | 37 using sync_driver::DataTypeManager; |
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
476 pref_service()->ClearPref(sync_driver::prefs::kSyncFirstSetupComplete); | 476 pref_service()->ClearPref(sync_driver::prefs::kSyncFirstSetupComplete); |
477 | 477 |
478 EXPECT_CALL(observer_, OnStateChanged()).Times(AnyNumber()); | 478 EXPECT_CALL(observer_, OnStateChanged()).Times(AnyNumber()); |
479 sync_service_->Initialize(); | 479 sync_service_->Initialize(); |
480 | 480 |
481 auto sync_blocker = sync_service_->GetSetupInProgressHandle(); | 481 auto sync_blocker = sync_service_->GetSetupInProgressHandle(); |
482 IssueTestTokens(account_id); | 482 IssueTestTokens(account_id); |
483 sync_blocker.reset(); | 483 sync_blocker.reset(); |
484 EXPECT_FALSE(sync_service_->IsSyncActive()); | 484 EXPECT_FALSE(sync_service_->IsSyncActive()); |
485 } | 485 } |
OLD | NEW |