| OLD | NEW |
| 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 <stddef.h> | 5 #include <stddef.h> |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 | 111 |
| 112 void TearDownOnMainThread() override { | 112 void TearDownOnMainThread() override { |
| 113 // Make sure to close any showing popups prior to tearing down the UI. | 113 // Make sure to close any showing popups prior to tearing down the UI. |
| 114 content::WebContents* web_contents = | 114 content::WebContents* web_contents = |
| 115 browser()->tab_strip_model()->GetActiveWebContents(); | 115 browser()->tab_strip_model()->GetActiveWebContents(); |
| 116 AutofillManager* autofill_manager = | 116 AutofillManager* autofill_manager = |
| 117 ContentAutofillDriverFactory::FromWebContents(web_contents) | 117 ContentAutofillDriverFactory::FromWebContents(web_contents) |
| 118 ->DriverForFrame(web_contents->GetMainFrame()) | 118 ->DriverForFrame(web_contents->GetMainFrame()) |
| 119 ->autofill_manager(); | 119 ->autofill_manager(); |
| 120 autofill_manager->client()->HideAutofillPopup(); | 120 autofill_manager->client()->HideAutofillPopup(); |
| 121 test::ReenableSystemServices(); |
| 121 } | 122 } |
| 122 | 123 |
| 123 PersonalDataManager* personal_data_manager() { | 124 PersonalDataManager* personal_data_manager() { |
| 124 return PersonalDataManagerFactory::GetForProfile(browser()->profile()); | 125 return PersonalDataManagerFactory::GetForProfile(browser()->profile()); |
| 125 } | 126 } |
| 126 | 127 |
| 127 void SetProfiles(std::vector<AutofillProfile>* profiles) { | 128 void SetProfiles(std::vector<AutofillProfile>* profiles) { |
| 128 WindowedPersonalDataManagerObserver observer(browser()); | 129 WindowedPersonalDataManagerObserver observer(browser()); |
| 129 personal_data_manager()->SetProfiles(profiles); | 130 personal_data_manager()->SetProfiles(profiles); |
| 130 observer.Wait(); | 131 observer.Wait(); |
| (...skipping 674 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 805 IN_PROC_BROWSER_TEST_F(AutofillTest, | 806 IN_PROC_BROWSER_TEST_F(AutofillTest, |
| 806 DISABLED_MergeAggregatedDuplicatedProfiles) { | 807 DISABLED_MergeAggregatedDuplicatedProfiles) { |
| 807 int num_of_profiles = | 808 int num_of_profiles = |
| 808 AggregateProfilesIntoAutofillPrefs("dataset_duplicated_profiles.txt"); | 809 AggregateProfilesIntoAutofillPrefs("dataset_duplicated_profiles.txt"); |
| 809 | 810 |
| 810 ASSERT_GT(num_of_profiles, | 811 ASSERT_GT(num_of_profiles, |
| 811 static_cast<int>(personal_data_manager()->GetProfiles().size())); | 812 static_cast<int>(personal_data_manager()->GetProfiles().size())); |
| 812 } | 813 } |
| 813 | 814 |
| 814 } // namespace autofill | 815 } // namespace autofill |
| OLD | NEW |