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

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

Issue 13928035: WIP Component build of autofill Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: make windows compiling Created 7 years, 8 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 <set> 5 #include <set>
6 #include <string> 6 #include <string>
7 #include <vector> 7 #include <vector>
8 8
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after
484 profile_.get(), MockPersonalDataManagerService::Build)); 484 profile_.get(), MockPersonalDataManagerService::Build));
485 personal_data_manager_ = 485 personal_data_manager_ =
486 personal_data_manager_service->GetPersonalDataManager(); 486 personal_data_manager_service->GetPersonalDataManager();
487 487
488 token_service_ = static_cast<TokenService*>( 488 token_service_ = static_cast<TokenService*>(
489 TokenServiceFactory::GetInstance()->SetTestingFactoryAndUse( 489 TokenServiceFactory::GetInstance()->SetTestingFactoryAndUse(
490 profile_.get(), BuildTokenService)); 490 profile_.get(), BuildTokenService));
491 EXPECT_CALL(*personal_data_manager_, LoadProfiles()).Times(1); 491 EXPECT_CALL(*personal_data_manager_, LoadProfiles()).Times(1);
492 EXPECT_CALL(*personal_data_manager_, LoadCreditCards()).Times(1); 492 EXPECT_CALL(*personal_data_manager_, LoadCreditCards()).Times(1);
493 493
494 personal_data_manager_->Init(profile_.get()); 494 personal_data_manager_->Init(
495 profile_.get(),
496 WebDataServiceFactory::GetAutofillWebDataServiceForProfile(
497 profile_.get()));
495 498
496 web_data_service_->StartSyncableService(); 499 web_data_service_->StartSyncableService();
497 } 500 }
498 501
499 virtual void TearDown() OVERRIDE { 502 virtual void TearDown() OVERRIDE {
500 // Note: The tear down order is important. 503 // Note: The tear down order is important.
501 ProfileSyncServiceFactory::GetInstance()->SetTestingFactory( 504 ProfileSyncServiceFactory::GetInstance()->SetTestingFactory(
502 profile_.get(), NULL); 505 profile_.get(), NULL);
503 web_data_service_->ShutdownSyncableService(); 506 web_data_service_->ShutdownSyncableService();
504 profile_->ResetRequestContext(); 507 profile_->ResetRequestContext();
(...skipping 858 matching lines...) Expand 10 before | Expand all | Expand 10 after
1363 std::vector<AutofillEntry> sync_entries; 1366 std::vector<AutofillEntry> sync_entries;
1364 std::vector<AutofillProfile> sync_profiles; 1367 std::vector<AutofillProfile> sync_profiles;
1365 ASSERT_TRUE(GetAutofillEntriesFromSyncDB(&sync_entries, &sync_profiles)); 1368 ASSERT_TRUE(GetAutofillEntriesFromSyncDB(&sync_entries, &sync_profiles));
1366 EXPECT_EQ(3U, sync_entries.size()); 1369 EXPECT_EQ(3U, sync_entries.size());
1367 EXPECT_EQ(0U, sync_profiles.size()); 1370 EXPECT_EQ(0U, sync_profiles.size());
1368 for (size_t i = 0; i < sync_entries.size(); i++) { 1371 for (size_t i = 0; i < sync_entries.size(); i++) {
1369 DVLOG(1) << "Entry " << i << ": " << sync_entries[i].key().name() 1372 DVLOG(1) << "Entry " << i << ": " << sync_entries[i].key().name()
1370 << ", " << sync_entries[i].key().value(); 1373 << ", " << sync_entries[i].key().value();
1371 } 1374 }
1372 } 1375 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698