| 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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 AutofillUploadContents upload; | 152 AutofillUploadContents upload; |
| 153 upload.set_submission(true); | 153 upload.set_submission(true); |
| 154 upload.set_client_version("6.1.1715.1442/en (GGLL)"); | 154 upload.set_client_version("6.1.1715.1442/en (GGLL)"); |
| 155 upload.set_form_signature(15916856893790176210U); | 155 upload.set_form_signature(15916856893790176210U); |
| 156 upload.set_autofill_used(false); | 156 upload.set_autofill_used(false); |
| 157 upload.set_data_present("1f7e0003780000080004"); | 157 upload.set_data_present("1f7e0003780000080004"); |
| 158 upload.set_action_signature(15724779818122431245U); | 158 upload.set_action_signature(15724779818122431245U); |
| 159 upload.set_form_name("test_form"); | 159 upload.set_form_name("test_form"); |
| 160 | 160 |
| 161 test::FillUploadField(upload.add_field(), 2594484045U, "one", "text", nullptr, | 161 test::FillUploadField(upload.add_field(), 2594484045U, "one", "text", nullptr, |
| 162 2U, nullptr); | 162 2U); |
| 163 test::FillUploadField(upload.add_field(), 2750915947U, "two", "text", "off", | 163 test::FillUploadField(upload.add_field(), 2750915947U, "two", "text", "off", |
| 164 2U, nullptr); | 164 2U); |
| 165 test::FillUploadField(upload.add_field(), 3494787134U, "three", "text", | 165 test::FillUploadField(upload.add_field(), 3494787134U, "three", "text", |
| 166 nullptr, 2U, nullptr); | 166 nullptr, 2U); |
| 167 test::FillUploadField(upload.add_field(), 1236501728U, "four", "text", "off", | 167 test::FillUploadField(upload.add_field(), 1236501728U, "four", "text", "off", |
| 168 2U, nullptr); | 168 2U); |
| 169 | 169 |
| 170 std::string expected_upload_string; | 170 std::string expected_upload_string; |
| 171 ASSERT_TRUE(upload.SerializeToString(&expected_upload_string)); | 171 ASSERT_TRUE(upload.SerializeToString(&expected_upload_string)); |
| 172 | 172 |
| 173 WindowedNetworkObserver upload_network_observer(expected_upload_string); | 173 WindowedNetworkObserver upload_network_observer(expected_upload_string); |
| 174 content::WebContents* web_contents = | 174 content::WebContents* web_contents = |
| 175 browser()->tab_strip_model()->GetActiveWebContents(); | 175 browser()->tab_strip_model()->GetActiveWebContents(); |
| 176 content::SimulateMouseClick( | 176 content::SimulateMouseClick( |
| 177 web_contents, 0, blink::WebMouseEvent::Button::Left); | 177 web_contents, 0, blink::WebMouseEvent::Button::Left); |
| 178 upload_network_observer.Wait(); | 178 upload_network_observer.Wait(); |
| (...skipping 26 matching lines...) Expand all Loading... |
| 205 std::string expected_query_string; | 205 std::string expected_query_string; |
| 206 ASSERT_TRUE(query.SerializeToString(&expected_query_string)); | 206 ASSERT_TRUE(query.SerializeToString(&expected_query_string)); |
| 207 | 207 |
| 208 WindowedNetworkObserver query_network_observer(expected_query_string); | 208 WindowedNetworkObserver query_network_observer(expected_query_string); |
| 209 ui_test_utils::NavigateToURL( | 209 ui_test_utils::NavigateToURL( |
| 210 browser(), GURL(std::string(kDataURIPrefix) + kFormHtml)); | 210 browser(), GURL(std::string(kDataURIPrefix) + kFormHtml)); |
| 211 query_network_observer.Wait(); | 211 query_network_observer.Wait(); |
| 212 } | 212 } |
| 213 | 213 |
| 214 } // namespace autofill | 214 } // namespace autofill |
| OLD | NEW |