OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |