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

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

Issue 659793005: [Password Generation] Always query password forms via Autofill (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Done Created 6 years, 1 month 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
« no previous file with comments | « no previous file | components/autofill/core/browser/form_structure.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "base/macros.h" 5 #include "base/macros.h"
6 #include "base/memory/ref_counted.h" 6 #include "base/memory/ref_counted.h"
7 #include "base/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "chrome/browser/autofill/personal_data_manager_factory.h" 10 #include "chrome/browser/autofill/personal_data_manager_factory.h"
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 "<field signature=\"1236501728\" autofilltype=\"2\"/>" 162 "<field signature=\"1236501728\" autofilltype=\"2\"/>"
163 "</autofillupload>"; 163 "</autofillupload>";
164 WindowedNetworkObserver upload_network_observer(kUploadRequest); 164 WindowedNetworkObserver upload_network_observer(kUploadRequest);
165 content::WebContents* web_contents = 165 content::WebContents* web_contents =
166 browser()->tab_strip_model()->GetActiveWebContents(); 166 browser()->tab_strip_model()->GetActiveWebContents();
167 content::SimulateMouseClick( 167 content::SimulateMouseClick(
168 web_contents, 0, blink::WebMouseEvent::ButtonLeft); 168 web_contents, 0, blink::WebMouseEvent::ButtonLeft);
169 upload_network_observer.Wait(); 169 upload_network_observer.Wait();
170 } 170 }
171 171
172 // Verify that a site with password fields will query even in the presence
173 // of user defined autocomplete types.
174 IN_PROC_BROWSER_TEST_F(AutofillServerTest,
175 AlwaysQueryForPasswordFields) {
176 // Load the test page. Expect a query request upon loading the page.
177 const char kDataURIPrefix[] = "data:text/html;charset=utf-8,";
178 const char kFormHtml[] =
179 "<form id='test_form'>"
180 " <input type='text' id='one' autocomplete='username'>"
181 " <input type='text' id='two' autocomplete='off'>"
182 " <input type='password' id='three'>"
183 " <input type='submit'>"
184 "</form>";
185 const char kQueryRequest[] =
186 "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
187 "<autofillquery clientversion=\"6.1.1715.1442/en (GGLL)\">"
188 "<form signature=\"8900697631820480876\">"
189 "<field signature=\"2594484045\"/>"
190 "<field signature=\"2750915947\"/>"
191 "<field signature=\"116843943\"/>"
192 "</form>"
193 "</autofillquery>";
194 WindowedNetworkObserver query_network_observer(kQueryRequest);
195 ui_test_utils::NavigateToURL(
196 browser(), GURL(std::string(kDataURIPrefix) + kFormHtml));
197 query_network_observer.Wait();
198 }
199
172 } // namespace autofill 200 } // namespace autofill
OLDNEW
« no previous file with comments | « no previous file | components/autofill/core/browser/form_structure.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698