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

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

Issue 2073093002: [Password Generation] Sends CSS classes inside autofill proto (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed useless FormStructure recreation in FormStructureTest.EncodeUploadRequest_WithCssClasses Created 4 years, 6 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
« no previous file with comments | « no previous file | chrome/renderer/autofill/form_autofill_browsertest.cc » ('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/base_switches.h" 5 #include "base/base_switches.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 AutofillUploadContents upload; 156 AutofillUploadContents upload;
157 upload.set_submission(true); 157 upload.set_submission(true);
158 upload.set_client_version("6.1.1715.1442/en (GGLL)"); 158 upload.set_client_version("6.1.1715.1442/en (GGLL)");
159 upload.set_form_signature(15916856893790176210U); 159 upload.set_form_signature(15916856893790176210U);
160 upload.set_autofill_used(false); 160 upload.set_autofill_used(false);
161 upload.set_data_present("1f7e0003780000080004"); 161 upload.set_data_present("1f7e0003780000080004");
162 upload.set_action_signature(15724779818122431245U); 162 upload.set_action_signature(15724779818122431245U);
163 upload.set_form_name("test_form"); 163 upload.set_form_name("test_form");
164 164
165 test::FillUploadField(upload.add_field(), 2594484045U, "one", "text", nullptr, 165 test::FillUploadField(upload.add_field(), 2594484045U, "one", "text", nullptr,
166 nullptr, 2U); 166 nullptr, 2U, nullptr);
167 test::FillUploadField(upload.add_field(), 2750915947U, "two", "text", nullptr, 167 test::FillUploadField(upload.add_field(), 2750915947U, "two", "text", nullptr,
168 "off", 2U); 168 "off", 2U, nullptr);
169 test::FillUploadField(upload.add_field(), 3494787134U, "three", "text", 169 test::FillUploadField(upload.add_field(), 3494787134U, "three", "text",
170 nullptr, nullptr, 2U); 170 nullptr, nullptr, 2U, nullptr);
171 test::FillUploadField(upload.add_field(), 1236501728U, "four", "text", 171 test::FillUploadField(upload.add_field(), 1236501728U, "four", "text",
172 nullptr, "off", 2U); 172 nullptr, "off", 2U, nullptr);
173 173
174 std::string expected_upload_string; 174 std::string expected_upload_string;
175 ASSERT_TRUE(upload.SerializeToString(&expected_upload_string)); 175 ASSERT_TRUE(upload.SerializeToString(&expected_upload_string));
176 176
177 WindowedNetworkObserver upload_network_observer(expected_upload_string); 177 WindowedNetworkObserver upload_network_observer(expected_upload_string);
178 content::WebContents* web_contents = 178 content::WebContents* web_contents =
179 browser()->tab_strip_model()->GetActiveWebContents(); 179 browser()->tab_strip_model()->GetActiveWebContents();
180 content::SimulateMouseClick( 180 content::SimulateMouseClick(
181 web_contents, 0, blink::WebMouseEvent::ButtonLeft); 181 web_contents, 0, blink::WebMouseEvent::ButtonLeft);
182 upload_network_observer.Wait(); 182 upload_network_observer.Wait();
(...skipping 28 matching lines...) Expand all
211 std::string expected_query_string; 211 std::string expected_query_string;
212 ASSERT_TRUE(query.SerializeToString(&expected_query_string)); 212 ASSERT_TRUE(query.SerializeToString(&expected_query_string));
213 213
214 WindowedNetworkObserver query_network_observer(expected_query_string); 214 WindowedNetworkObserver query_network_observer(expected_query_string);
215 ui_test_utils::NavigateToURL( 215 ui_test_utils::NavigateToURL(
216 browser(), GURL(std::string(kDataURIPrefix) + kFormHtml)); 216 browser(), GURL(std::string(kDataURIPrefix) + kFormHtml));
217 query_network_observer.Wait(); 217 query_network_observer.Wait();
218 } 218 }
219 219
220 } // namespace autofill 220 } // namespace autofill
OLDNEW
« no previous file with comments | « no previous file | chrome/renderer/autofill/form_autofill_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698