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

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

Issue 562603002: Move PageTransition from //content/public/common to //ui/base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 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 <string> 5 #include <string>
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/files/file_util.h" 9 #include "base/files/file_util.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 cards.push_back(card); 157 cards.push_back(card);
158 SetCards(&cards); 158 SetCards(&cards);
159 } 159 }
160 160
161 typedef std::map<std::string, std::string> FormMap; 161 typedef std::map<std::string, std::string> FormMap;
162 // Navigate to the form, input values into the fields, and submit the form. 162 // Navigate to the form, input values into the fields, and submit the form.
163 // The function returns after the PersonalDataManager is updated. 163 // The function returns after the PersonalDataManager is updated.
164 void FillFormAndSubmit(const std::string& filename, const FormMap& data) { 164 void FillFormAndSubmit(const std::string& filename, const FormMap& data) {
165 GURL url = test_server()->GetURL("files/autofill/" + filename); 165 GURL url = test_server()->GetURL("files/autofill/" + filename);
166 chrome::NavigateParams params(browser(), url, 166 chrome::NavigateParams params(browser(), url,
167 content::PAGE_TRANSITION_LINK); 167 ui::PAGE_TRANSITION_LINK);
168 params.disposition = NEW_FOREGROUND_TAB; 168 params.disposition = NEW_FOREGROUND_TAB;
169 ui_test_utils::NavigateToURL(&params); 169 ui_test_utils::NavigateToURL(&params);
170 170
171 std::string js; 171 std::string js;
172 for (FormMap::const_iterator i = data.begin(); i != data.end(); ++i) { 172 for (FormMap::const_iterator i = data.begin(); i != data.end(); ++i) {
173 js += "document.getElementById('" + i->first + "').value = '" + 173 js += "document.getElementById('" + i->first + "').value = '" +
174 i->second + "';"; 174 i->second + "';";
175 } 175 }
176 js += "document.onclick = function() {" 176 js += "document.onclick = function() {"
177 " document.getElementById('testform').submit();" 177 " document.getElementById('testform').submit();"
(...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after
834 IN_PROC_BROWSER_TEST_F(AutofillTest, 834 IN_PROC_BROWSER_TEST_F(AutofillTest,
835 DISABLED_MergeAggregatedDuplicatedProfiles) { 835 DISABLED_MergeAggregatedDuplicatedProfiles) {
836 int num_of_profiles = 836 int num_of_profiles =
837 AggregateProfilesIntoAutofillPrefs("dataset_duplicated_profiles.txt"); 837 AggregateProfilesIntoAutofillPrefs("dataset_duplicated_profiles.txt");
838 838
839 ASSERT_GT(num_of_profiles, 839 ASSERT_GT(num_of_profiles,
840 static_cast<int>(personal_data_manager()->GetProfiles().size())); 840 static_cast<int>(personal_data_manager()->GetProfiles().size()));
841 } 841 }
842 842
843 } // namespace autofill 843 } // namespace autofill
OLDNEW
« no previous file with comments | « chrome/browser/autocomplete/shortcuts_provider_unittest.cc ('k') | chrome/browser/autofill/autofill_cc_infobar_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698