Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(70)

Side by Side Diff: chrome/browser/sync/profile_sync_service_startup_unittest.cc

Issue 10520010: Not for review: Support sync init with missing or corrupt store (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Documentation Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698