| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 <string> | 5 #include <string> |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/files/file_util.h" | 8 #include "base/files/file_util.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 391 ASSERT_TRUE(content::ExecuteScriptAndExtractInt( | 391 ASSERT_TRUE(content::ExecuteScriptAndExtractInt( |
| 392 GetRenderViewHost(), | 392 GetRenderViewHost(), |
| 393 "var bounds = document.getElementById('" + | 393 "var bounds = document.getElementById('" + |
| 394 id + | 394 id + |
| 395 "').getBoundingClientRect();" | 395 "').getBoundingClientRect();" |
| 396 "domAutomationController.send(" | 396 "domAutomationController.send(" |
| 397 " Math.floor(bounds.top + bounds.height / 2));", | 397 " Math.floor(bounds.top + bounds.height / 2));", |
| 398 &y)); | 398 &y)); |
| 399 content::SimulateMouseClickAt(GetWebContents(), | 399 content::SimulateMouseClickAt(GetWebContents(), |
| 400 0, | 400 0, |
| 401 blink::WebMouseEvent::ButtonLeft, | 401 blink::WebMouseEvent::Button::Left, |
| 402 gfx::Point(x, y)); | 402 gfx::Point(x, y)); |
| 403 } | 403 } |
| 404 | 404 |
| 405 void ClickFirstNameField() { | 405 void ClickFirstNameField() { |
| 406 ASSERT_NO_FATAL_FAILURE(ClickElementWithId("firstname")); | 406 ASSERT_NO_FATAL_FAILURE(ClickElementWithId("firstname")); |
| 407 } | 407 } |
| 408 | 408 |
| 409 // Make a pointless round trip to the renderer, giving the popup a chance to | 409 // Make a pointless round trip to the renderer, giving the popup a chance to |
| 410 // show if it's going to. If it does show, an assert in | 410 // show if it's going to. If it does show, an assert in |
| 411 // AutofillManagerTestDelegateImpl will trigger. | 411 // AutofillManagerTestDelegateImpl will trigger. |
| (...skipping 1302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1714 ASSERT_NO_FATAL_FAILURE(ui_test_utils::NavigateToURL(browser(), | 1714 ASSERT_NO_FATAL_FAILURE(ui_test_utils::NavigateToURL(browser(), |
| 1715 GURL(std::string(kDataURIPrefix) + kTestPasswordFormString))); | 1715 GURL(std::string(kDataURIPrefix) + kTestPasswordFormString))); |
| 1716 ASSERT_TRUE(content::ExecuteScript( | 1716 ASSERT_TRUE(content::ExecuteScript( |
| 1717 GetRenderViewHost(), | 1717 GetRenderViewHost(), |
| 1718 "document.getElementById('user').value = 'user';")); | 1718 "document.getElementById('user').value = 'user';")); |
| 1719 FocusFieldByName("password"); | 1719 FocusFieldByName("password"); |
| 1720 PasteStringAndWait("foobar"); | 1720 PasteStringAndWait("foobar"); |
| 1721 } | 1721 } |
| 1722 | 1722 |
| 1723 } // namespace autofill | 1723 } // namespace autofill |
| OLD | NEW |