Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(244)

Side by Side Diff: chrome/browser/autofill/autofill_browsertest.cc

Issue 2248873002: Convert WindowOpenDisposition to an enum class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 // Helper where the actual submit JS code can be specified, as well as whether 171 // Helper where the actual submit JS code can be specified, as well as whether
172 // the test should |simulate_click| on the document. 172 // the test should |simulate_click| on the document.
173 void FillFormAndSubmitWithHandler(const std::string& filename, 173 void FillFormAndSubmitWithHandler(const std::string& filename,
174 const FormMap& data, 174 const FormMap& data,
175 const std::string& submit_js, 175 const std::string& submit_js,
176 bool simulate_click, 176 bool simulate_click,
177 bool expect_personal_data_change) { 177 bool expect_personal_data_change) {
178 GURL url = embedded_test_server()->GetURL("/autofill/" + filename); 178 GURL url = embedded_test_server()->GetURL("/autofill/" + filename);
179 chrome::NavigateParams params(browser(), url, 179 chrome::NavigateParams params(browser(), url,
180 ui::PAGE_TRANSITION_LINK); 180 ui::PAGE_TRANSITION_LINK);
181 params.disposition = NEW_FOREGROUND_TAB; 181 params.disposition = WindowOpenDisposition::NEW_FOREGROUND_TAB;
182 ui_test_utils::NavigateToURL(&params); 182 ui_test_utils::NavigateToURL(&params);
183 183
184 std::unique_ptr<WindowedPersonalDataManagerObserver> observer; 184 std::unique_ptr<WindowedPersonalDataManagerObserver> observer;
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
(...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « chrome/browser/apps/install_chrome_app.cc ('k') | chrome/browser/autofill/content_autofill_driver_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698