| 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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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, nullptr); |
| 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::ButtonLeft); | 177 web_contents, 0, blink::WebMouseEvent::Button::Left); |
| 178 upload_network_observer.Wait(); | 178 upload_network_observer.Wait(); |
| 179 } | 179 } |
| 180 | 180 |
| 181 // Verify that a site with password fields will query even in the presence | 181 // Verify that a site with password fields will query even in the presence |
| 182 // of user defined autocomplete types. | 182 // of user defined autocomplete types. |
| 183 IN_PROC_BROWSER_TEST_F(AutofillServerTest, | 183 IN_PROC_BROWSER_TEST_F(AutofillServerTest, |
| 184 AlwaysQueryForPasswordFields) { | 184 AlwaysQueryForPasswordFields) { |
| 185 // Load the test page. Expect a query request upon loading the page. | 185 // Load the test page. Expect a query request upon loading the page. |
| 186 const char kDataURIPrefix[] = "data:text/html;charset=utf-8,"; | 186 const char kDataURIPrefix[] = "data:text/html;charset=utf-8,"; |
| 187 const char kFormHtml[] = | 187 const char kFormHtml[] = |
| (...skipping 17 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 |