| 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 <utility> | 7 #include <utility> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
| (...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 490 personal_data_manager_ = static_cast<MockPersonalDataManager*>( | 490 personal_data_manager_ = static_cast<MockPersonalDataManager*>( |
| 491 autofill::PersonalDataManagerFactory::GetInstance() | 491 autofill::PersonalDataManagerFactory::GetInstance() |
| 492 ->SetTestingFactoryAndUse(profile_, | 492 ->SetTestingFactoryAndUse(profile_, |
| 493 MockPersonalDataManager::Build)); | 493 MockPersonalDataManager::Build)); |
| 494 | 494 |
| 495 EXPECT_CALL(*personal_data_manager_, LoadProfiles()).Times(1); | 495 EXPECT_CALL(*personal_data_manager_, LoadProfiles()).Times(1); |
| 496 EXPECT_CALL(*personal_data_manager_, LoadCreditCards()).Times(1); | 496 EXPECT_CALL(*personal_data_manager_, LoadCreditCards()).Times(1); |
| 497 | 497 |
| 498 personal_data_manager_->Init( | 498 personal_data_manager_->Init( |
| 499 WebDataServiceFactory::GetAutofillWebDataForProfile( | 499 WebDataServiceFactory::GetAutofillWebDataForProfile( |
| 500 profile_, Profile::EXPLICIT_ACCESS), | 500 profile_, ServiceAccessType::EXPLICIT_ACCESS), |
| 501 profile_->GetPrefs(), | 501 profile_->GetPrefs(), |
| 502 profile_->IsOffTheRecord()); | 502 profile_->IsOffTheRecord()); |
| 503 | 503 |
| 504 web_data_service_->StartSyncableService(); | 504 web_data_service_->StartSyncableService(); |
| 505 | 505 |
| 506 // When UpdateAutofillEntries() is called with an empty list, the return | 506 // When UpdateAutofillEntries() is called with an empty list, the return |
| 507 // value should be |true|, rather than the default of |false|. | 507 // value should be |true|, rather than the default of |false|. |
| 508 std::vector<AutofillEntry> empty; | 508 std::vector<AutofillEntry> empty; |
| 509 EXPECT_CALL(autofill_table_, UpdateAutofillEntries(empty)) | 509 EXPECT_CALL(autofill_table_, UpdateAutofillEntries(empty)) |
| 510 .WillRepeatedly(Return(true)); | 510 .WillRepeatedly(Return(true)); |
| (...skipping 861 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1372 std::vector<AutofillEntry> sync_entries; | 1372 std::vector<AutofillEntry> sync_entries; |
| 1373 std::vector<AutofillProfile> sync_profiles; | 1373 std::vector<AutofillProfile> sync_profiles; |
| 1374 ASSERT_TRUE(GetAutofillEntriesFromSyncDB(&sync_entries, &sync_profiles)); | 1374 ASSERT_TRUE(GetAutofillEntriesFromSyncDB(&sync_entries, &sync_profiles)); |
| 1375 EXPECT_EQ(3U, sync_entries.size()); | 1375 EXPECT_EQ(3U, sync_entries.size()); |
| 1376 EXPECT_EQ(0U, sync_profiles.size()); | 1376 EXPECT_EQ(0U, sync_profiles.size()); |
| 1377 for (size_t i = 0; i < sync_entries.size(); i++) { | 1377 for (size_t i = 0; i < sync_entries.size(); i++) { |
| 1378 DVLOG(1) << "Entry " << i << ": " << sync_entries[i].key().name() | 1378 DVLOG(1) << "Entry " << i << ": " << sync_entries[i].key().name() |
| 1379 << ", " << sync_entries[i].key().value(); | 1379 << ", " << sync_entries[i].key().value(); |
| 1380 } | 1380 } |
| 1381 } | 1381 } |
| OLD | NEW |