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 "base/file_util.h" | 5 #include "base/file_util.h" |
6 #include "base/memory/scoped_ptr.h" | 6 #include "base/memory/scoped_ptr.h" |
7 #include "base/prefs/pref_service.h" | 7 #include "base/prefs/pref_service.h" |
8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
9 #include "chrome/browser/prefs/pref_service_syncable.h" | 9 #include "chrome/browser/prefs/pref_service_syncable.h" |
10 #include "chrome/browser/signin/fake_profile_oauth2_token_service.h" | 10 #include "chrome/browser/signin/fake_profile_oauth2_token_service.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 #include "components/sync_driver/pref_names.h" | 28 #include "components/sync_driver/pref_names.h" |
29 #include "components/sync_driver/sync_prefs.h" | 29 #include "components/sync_driver/sync_prefs.h" |
30 #include "content/public/test/test_browser_thread_bundle.h" | 30 #include "content/public/test/test_browser_thread_bundle.h" |
31 #include "content/public/test/test_utils.h" | 31 #include "content/public/test/test_utils.h" |
32 #include "google_apis/gaia/gaia_auth_consumer.h" | 32 #include "google_apis/gaia/gaia_auth_consumer.h" |
33 #include "google_apis/gaia/gaia_constants.h" | 33 #include "google_apis/gaia/gaia_constants.h" |
34 #include "google_apis/gaia/oauth2_token_service.h" | 34 #include "google_apis/gaia/oauth2_token_service.h" |
35 #include "testing/gmock/include/gmock/gmock.h" | 35 #include "testing/gmock/include/gmock/gmock.h" |
36 #include "testing/gtest/include/gtest/gtest.h" | 36 #include "testing/gtest/include/gtest/gtest.h" |
37 | 37 |
38 using browser_sync::DataTypeManager; | |
39 using browser_sync::DataTypeManagerMock; | |
40 using browser_sync::SyncBackendHostMock; | 38 using browser_sync::SyncBackendHostMock; |
41 using content::BrowserThread; | 39 using content::BrowserThread; |
| 40 using sync_driver::DataTypeManager; |
| 41 using sync_driver::DataTypeManagerMock; |
42 using testing::_; | 42 using testing::_; |
43 using testing::AnyNumber; | 43 using testing::AnyNumber; |
44 using testing::DoAll; | 44 using testing::DoAll; |
45 using testing::InvokeArgument; | 45 using testing::InvokeArgument; |
46 using testing::Mock; | 46 using testing::Mock; |
47 using testing::Return; | 47 using testing::Return; |
48 | 48 |
49 ACTION_P(InvokeOnConfigureStart, pss) { | 49 ACTION_P(InvokeOnConfigureStart, pss) { |
50 ProfileSyncService* service = | 50 ProfileSyncService* service = |
51 static_cast<ProfileSyncService*>(pss); | 51 static_cast<ProfileSyncService*>(pss); |
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
522 profile_->GetPrefs()->ClearPref(sync_driver::prefs::kSyncHasSetupCompleted); | 522 profile_->GetPrefs()->ClearPref(sync_driver::prefs::kSyncHasSetupCompleted); |
523 | 523 |
524 EXPECT_CALL(observer_, OnStateChanged()).Times(AnyNumber()); | 524 EXPECT_CALL(observer_, OnStateChanged()).Times(AnyNumber()); |
525 sync_->Initialize(); | 525 sync_->Initialize(); |
526 | 526 |
527 sync_->SetSetupInProgress(true); | 527 sync_->SetSetupInProgress(true); |
528 IssueTestTokens(); | 528 IssueTestTokens(); |
529 sync_->SetSetupInProgress(false); | 529 sync_->SetSetupInProgress(false); |
530 EXPECT_FALSE(sync_->sync_initialized()); | 530 EXPECT_FALSE(sync_->sync_initialized()); |
531 } | 531 } |
OLD | NEW |