| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 public: | 115 public: |
| 116 MOCK_CONST_METHOD0(IsDataLoaded, bool()); | 116 MOCK_CONST_METHOD0(IsDataLoaded, bool()); |
| 117 MOCK_METHOD0(LoadProfiles, void()); | 117 MOCK_METHOD0(LoadProfiles, void()); |
| 118 MOCK_METHOD0(LoadCreditCards, void()); | 118 MOCK_METHOD0(LoadCreditCards, void()); |
| 119 MOCK_METHOD0(Refresh, void()); | 119 MOCK_METHOD0(Refresh, void()); |
| 120 }; | 120 }; |
| 121 | 121 |
| 122 ACTION_P4(MakeAutofillSyncComponents, service, wd, pdm, dtc) { | 122 ACTION_P4(MakeAutofillSyncComponents, service, wd, pdm, dtc) { |
| 123 DCHECK(ChromeThread::CurrentlyOn(ChromeThread::DB)); | 123 DCHECK(ChromeThread::CurrentlyOn(ChromeThread::DB)); |
| 124 AutofillModelAssociator* model_associator = | 124 AutofillModelAssociator* model_associator = |
| 125 new AutofillModelAssociator(service, wd, pdm, dtc); | 125 new AutofillModelAssociator(service, wd, pdm); |
| 126 AutofillChangeProcessor* change_processor = | 126 AutofillChangeProcessor* change_processor = |
| 127 new AutofillChangeProcessor(model_associator, wd, pdm, dtc); | 127 new AutofillChangeProcessor(model_associator, wd, pdm, dtc); |
| 128 return ProfileSyncFactory::SyncComponents(model_associator, | 128 return ProfileSyncFactory::SyncComponents(model_associator, |
| 129 change_processor); | 129 change_processor); |
| 130 } | 130 } |
| 131 | 131 |
| 132 class ProfileSyncServiceAutofillTest : public testing::Test { | 132 class ProfileSyncServiceAutofillTest : public testing::Test { |
| 133 protected: | 133 protected: |
| 134 ProfileSyncServiceAutofillTest() | 134 ProfileSyncServiceAutofillTest() |
| 135 : ui_thread_(ChromeThread::UI, &message_loop_), | 135 : ui_thread_(ChromeThread::UI, &message_loop_), |
| (...skipping 859 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 995 // Wait for the PPS to shut everything down and signal us. | 995 // Wait for the PPS to shut everything down and signal us. |
| 996 EXPECT_CALL(observer_, OnStateChanged()).WillOnce(QuitUIMessageLoop()); | 996 EXPECT_CALL(observer_, OnStateChanged()).WillOnce(QuitUIMessageLoop()); |
| 997 MessageLoop::current()->Run(); | 997 MessageLoop::current()->Run(); |
| 998 EXPECT_TRUE(service_->unrecoverable_error_detected()); | 998 EXPECT_TRUE(service_->unrecoverable_error_detected()); |
| 999 | 999 |
| 1000 // Ensure future autofill notifications don't crash. | 1000 // Ensure future autofill notifications don't crash. |
| 1001 notifier->Notify(NotificationType::AUTOFILL_ENTRIES_CHANGED, | 1001 notifier->Notify(NotificationType::AUTOFILL_ENTRIES_CHANGED, |
| 1002 Source<WebDataService>(web_data_service_.get()), | 1002 Source<WebDataService>(web_data_service_.get()), |
| 1003 Details<AutofillChangeList>(&changes)); | 1003 Details<AutofillChangeList>(&changes)); |
| 1004 } | 1004 } |
| OLD | NEW |