OLD | NEW |
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 515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
526 personal_data_manager_ = | 526 personal_data_manager_ = |
527 personal_data_manager_service->GetPersonalDataManager(); | 527 personal_data_manager_service->GetPersonalDataManager(); |
528 | 528 |
529 token_service_ = static_cast<TokenService*>( | 529 token_service_ = static_cast<TokenService*>( |
530 TokenServiceFactory::GetInstance()->SetTestingFactoryAndUse( | 530 TokenServiceFactory::GetInstance()->SetTestingFactoryAndUse( |
531 profile_.get(), BuildTokenService)); | 531 profile_.get(), BuildTokenService)); |
532 EXPECT_CALL(*personal_data_manager_, LoadProfiles()).Times(1); | 532 EXPECT_CALL(*personal_data_manager_, LoadProfiles()).Times(1); |
533 EXPECT_CALL(*personal_data_manager_, LoadCreditCards()).Times(1); | 533 EXPECT_CALL(*personal_data_manager_, LoadCreditCards()).Times(1); |
534 | 534 |
535 personal_data_manager_->Init( | 535 personal_data_manager_->Init( |
536 autofill::AutofillWebDataService::FromBrowserContext(profile_.get()), | 536 WebDataServiceFactory::GetAutofillWebDataForProfile( |
| 537 profile_.get(), Profile::EXPLICIT_ACCESS), |
537 profile_->GetPrefs(), | 538 profile_->GetPrefs(), |
538 profile_->IsOffTheRecord()); | 539 profile_->IsOffTheRecord()); |
539 | 540 |
540 web_data_service_->StartSyncableService(); | 541 web_data_service_->StartSyncableService(); |
541 } | 542 } |
542 | 543 |
543 virtual void TearDown() OVERRIDE { | 544 virtual void TearDown() OVERRIDE { |
544 // Note: The tear down order is important. | 545 // Note: The tear down order is important. |
545 ProfileSyncServiceFactory::GetInstance()->SetTestingFactory( | 546 ProfileSyncServiceFactory::GetInstance()->SetTestingFactory( |
546 profile_.get(), NULL); | 547 profile_.get(), NULL); |
(...skipping 861 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1408 std::vector<AutofillEntry> sync_entries; | 1409 std::vector<AutofillEntry> sync_entries; |
1409 std::vector<AutofillProfile> sync_profiles; | 1410 std::vector<AutofillProfile> sync_profiles; |
1410 ASSERT_TRUE(GetAutofillEntriesFromSyncDB(&sync_entries, &sync_profiles)); | 1411 ASSERT_TRUE(GetAutofillEntriesFromSyncDB(&sync_entries, &sync_profiles)); |
1411 EXPECT_EQ(3U, sync_entries.size()); | 1412 EXPECT_EQ(3U, sync_entries.size()); |
1412 EXPECT_EQ(0U, sync_profiles.size()); | 1413 EXPECT_EQ(0U, sync_profiles.size()); |
1413 for (size_t i = 0; i < sync_entries.size(); i++) { | 1414 for (size_t i = 0; i < sync_entries.size(); i++) { |
1414 DVLOG(1) << "Entry " << i << ": " << sync_entries[i].key().name() | 1415 DVLOG(1) << "Entry " << i << ": " << sync_entries[i].key().name() |
1415 << ", " << sync_entries[i].key().value(); | 1416 << ", " << sync_entries[i].key().value(); |
1416 } | 1417 } |
1417 } | 1418 } |
OLD | NEW |