| 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 "testing/gtest/include/gtest/gtest.h" | 5 #include "testing/gtest/include/gtest/gtest.h" |
| 6 | 6 |
| 7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
| 8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
| 9 #include "chrome/browser/prefs/pref_service.h" | 9 #include "chrome/browser/prefs/pref_service.h" |
| 10 #include "chrome/browser/signin/signin_manager.h" | 10 #include "chrome/browser/signin/signin_manager.h" |
| (...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 397 } | 397 } |
| 398 | 398 |
| 399 TEST_F(ProfileSyncServiceStartupTest, StartDownloadFailed) { | 399 TEST_F(ProfileSyncServiceStartupTest, StartDownloadFailed) { |
| 400 profile_->GetPrefs()->ClearPref(prefs::kSyncHasSetupCompleted); | 400 profile_->GetPrefs()->ClearPref(prefs::kSyncHasSetupCompleted); |
| 401 | 401 |
| 402 EXPECT_CALL(observer_, OnStateChanged()).Times(AnyNumber()); | 402 EXPECT_CALL(observer_, OnStateChanged()).Times(AnyNumber()); |
| 403 | 403 |
| 404 // Preload the tokens. | 404 // Preload the tokens. |
| 405 TokenServiceFactory::GetForProfile(profile_.get())->IssueAuthTokenForTest( | 405 TokenServiceFactory::GetForProfile(profile_.get())->IssueAuthTokenForTest( |
| 406 GaiaConstants::kSyncService, "sync_token"); | 406 GaiaConstants::kSyncService, "sync_token"); |
| 407 service_->fail_initial_download(); | 407 service_->fail_all_downloads(); |
| 408 | 408 |
| 409 service_->Initialize(); | 409 service_->Initialize(); |
| 410 EXPECT_FALSE(service_->sync_initialized()); | 410 EXPECT_FALSE(service_->sync_initialized()); |
| 411 EXPECT_FALSE(service_->GetBackendForTest()); | 411 EXPECT_FALSE(service_->GetBackendForTest()); |
| 412 } | 412 } |
| OLD | NEW |