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 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 if (expect_personal_data_change) | 185 if (expect_personal_data_change) |
186 observer.reset(new WindowedPersonalDataManagerObserver(browser())); | 186 observer.reset(new WindowedPersonalDataManagerObserver(browser())); |
187 | 187 |
188 std::string js = GetJSToFillForm(data) + submit_js; | 188 std::string js = GetJSToFillForm(data) + submit_js; |
189 ASSERT_TRUE(content::ExecuteScript(render_view_host(), js)); | 189 ASSERT_TRUE(content::ExecuteScript(render_view_host(), js)); |
190 if (simulate_click) { | 190 if (simulate_click) { |
191 // Simulate a mouse click to submit the form because form submissions not | 191 // Simulate a mouse click to submit the form because form submissions not |
192 // triggered by user gestures are ignored. | 192 // triggered by user gestures are ignored. |
193 content::SimulateMouseClick( | 193 content::SimulateMouseClick( |
194 browser()->tab_strip_model()->GetActiveWebContents(), 0, | 194 browser()->tab_strip_model()->GetActiveWebContents(), 0, |
195 blink::WebMouseEvent::ButtonLeft); | 195 blink::WebMouseEvent::Button::Left); |
196 } | 196 } |
197 // We may not always be expecting changes in Personal data. | 197 // We may not always be expecting changes in Personal data. |
198 if (observer.get()) | 198 if (observer.get()) |
199 observer->Wait(); | 199 observer->Wait(); |
200 else | 200 else |
201 base::RunLoop().RunUntilIdle(); | 201 base::RunLoop().RunUntilIdle(); |
202 } | 202 } |
203 | 203 |
204 // Aggregate profiles from forms into Autofill preferences. Returns the number | 204 // Aggregate profiles from forms into Autofill preferences. Returns the number |
205 // of parsed profiles. | 205 // of parsed profiles. |
(...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
806 IN_PROC_BROWSER_TEST_F(AutofillTest, | 806 IN_PROC_BROWSER_TEST_F(AutofillTest, |
807 DISABLED_MergeAggregatedDuplicatedProfiles) { | 807 DISABLED_MergeAggregatedDuplicatedProfiles) { |
808 int num_of_profiles = | 808 int num_of_profiles = |
809 AggregateProfilesIntoAutofillPrefs("dataset_duplicated_profiles.txt"); | 809 AggregateProfilesIntoAutofillPrefs("dataset_duplicated_profiles.txt"); |
810 | 810 |
811 ASSERT_GT(num_of_profiles, | 811 ASSERT_GT(num_of_profiles, |
812 static_cast<int>(personal_data_manager()->GetProfiles().size())); | 812 static_cast<int>(personal_data_manager()->GetProfiles().size())); |
813 } | 813 } |
814 | 814 |
815 } // namespace autofill | 815 } // namespace autofill |
OLD | NEW |