| 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 | 107 |
| 108 ASSERT_TRUE(embedded_test_server()->Start()); | 108 ASSERT_TRUE(embedded_test_server()->Start()); |
| 109 InProcessBrowserTest::SetUpOnMainThread(); | 109 InProcessBrowserTest::SetUpOnMainThread(); |
| 110 } | 110 } |
| 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 static_cast<ContentAutofillDriver*>( |
| 118 ->DriverForFrame(web_contents->GetMainFrame()) | 118 ContentAutofillDriverFactory::FromWebContents(web_contents) |
| 119 ->DriverForFrame(web_contents->GetMainFrame())) |
| 119 ->autofill_manager(); | 120 ->autofill_manager(); |
| 120 autofill_manager->client()->HideAutofillPopup(); | 121 autofill_manager->client()->HideAutofillPopup(); |
| 121 test::ReenableSystemServices(); | 122 test::ReenableSystemServices(); |
| 122 } | 123 } |
| 123 | 124 |
| 124 PersonalDataManager* personal_data_manager() { | 125 PersonalDataManager* personal_data_manager() { |
| 125 return PersonalDataManagerFactory::GetForProfile(browser()->profile()); | 126 return PersonalDataManagerFactory::GetForProfile(browser()->profile()); |
| 126 } | 127 } |
| 127 | 128 |
| 128 void SetProfiles(std::vector<AutofillProfile>* profiles) { | 129 void SetProfiles(std::vector<AutofillProfile>* profiles) { |
| (...skipping 677 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 806 IN_PROC_BROWSER_TEST_F(AutofillTest, | 807 IN_PROC_BROWSER_TEST_F(AutofillTest, |
| 807 DISABLED_MergeAggregatedDuplicatedProfiles) { | 808 DISABLED_MergeAggregatedDuplicatedProfiles) { |
| 808 int num_of_profiles = | 809 int num_of_profiles = |
| 809 AggregateProfilesIntoAutofillPrefs("dataset_duplicated_profiles.txt"); | 810 AggregateProfilesIntoAutofillPrefs("dataset_duplicated_profiles.txt"); |
| 810 | 811 |
| 811 ASSERT_GT(num_of_profiles, | 812 ASSERT_GT(num_of_profiles, |
| 812 static_cast<int>(personal_data_manager()->GetProfiles().size())); | 813 static_cast<int>(personal_data_manager()->GetProfiles().size())); |
| 813 } | 814 } |
| 814 | 815 |
| 815 } // namespace autofill | 816 } // namespace autofill |
| OLD | NEW |