Commit c355e2e1 authored by Alexey Khoroshilov's avatar Alexey Khoroshilov Committed by Commit Bot

Fix an element value check in PasswordManager interactive tests.

Bug: 849582
Change-Id: I6e75d9a62b4b58569c2c29b913c0a6a0cab0bf83
Reviewed-on: https://chromium-review.googlesource.com/1139057Reviewed-by: default avatarVasilii Sukhanov <vasilii@chromium.org>
Commit-Queue: Alexey Khoroshilov <sense@yandex-team.ru>
Cr-Commit-Position: refs/heads/master@{#575584}
parent fb8888cc
...@@ -36,6 +36,8 @@ void PasswordManagerInteractiveTestBase::FillElementWithValue( ...@@ -36,6 +36,8 @@ void PasswordManagerInteractiveTestBase::FillElementWithValue(
ui::DomCodeToUsLayoutKeyboardCode(dom_code), ui::DomCodeToUsLayoutKeyboardCode(dom_code),
false, shift, false, false); false, shift, false, false);
} }
// Execute an empty script to sync the pressed keys for an upcoming JS.
ASSERT_TRUE(content::ExecuteScript(RenderFrameHost(), ";"));
} }
void PasswordManagerInteractiveTestBase::VerifyPasswordIsSavedAndFilled( void PasswordManagerInteractiveTestBase::VerifyPasswordIsSavedAndFilled(
......
...@@ -281,7 +281,7 @@ IN_PROC_BROWSER_TEST_P(PasswordManagerBrowserTestWithConditionalPopupViews, ...@@ -281,7 +281,7 @@ IN_PROC_BROWSER_TEST_P(PasswordManagerBrowserTestWithConditionalPopupViews,
// Tests that if a site embeds the login and signup forms into one <form>, the // Tests that if a site embeds the login and signup forms into one <form>, the
// login form still gets autofilled. // login form still gets autofilled.
IN_PROC_BROWSER_TEST_P(PasswordManagerBrowserTestWithConditionalPopupViews, IN_PROC_BROWSER_TEST_P(PasswordManagerBrowserTestWithConditionalPopupViews,
DISABLED_AutofillLoginSignupForm) { AutofillLoginSignupForm) {
std::string submit = "document.getElementById('submit').click();"; std::string submit = "document.getElementById('submit').click();";
VerifyPasswordIsSavedAndFilled("/password/login_signup_form.html", "username", VerifyPasswordIsSavedAndFilled("/password/login_signup_form.html", "username",
"password", submit); "password", submit);
...@@ -291,7 +291,7 @@ IN_PROC_BROWSER_TEST_P(PasswordManagerBrowserTestWithConditionalPopupViews, ...@@ -291,7 +291,7 @@ IN_PROC_BROWSER_TEST_P(PasswordManagerBrowserTestWithConditionalPopupViews,
// Tests that password suggestions still work if the fields have the // Tests that password suggestions still work if the fields have the
// "autocomplete" attribute set to off. // "autocomplete" attribute set to off.
IN_PROC_BROWSER_TEST_P(PasswordManagerBrowserTestWithConditionalPopupViews, IN_PROC_BROWSER_TEST_P(PasswordManagerBrowserTestWithConditionalPopupViews,
DISABLED_AutofillPasswordFormWithAutocompleteOff) { AutofillPasswordFormWithAutocompleteOff) {
std::string submit = "document.getElementById('submit').click();"; std::string submit = "document.getElementById('submit').click();";
VerifyPasswordIsSavedAndFilled( VerifyPasswordIsSavedAndFilled(
"/password/password_autocomplete_off_test.html", "username", "password", "/password/password_autocomplete_off_test.html", "username", "password",
...@@ -300,7 +300,7 @@ IN_PROC_BROWSER_TEST_P(PasswordManagerBrowserTestWithConditionalPopupViews, ...@@ -300,7 +300,7 @@ IN_PROC_BROWSER_TEST_P(PasswordManagerBrowserTestWithConditionalPopupViews,
// Disabled for flakiness crbug.com/849582. // Disabled for flakiness crbug.com/849582.
IN_PROC_BROWSER_TEST_P(PasswordManagerBrowserTestWithConditionalPopupViews, IN_PROC_BROWSER_TEST_P(PasswordManagerBrowserTestWithConditionalPopupViews,
DISABLED_AutofillPasswordNoFormElement) { AutofillPasswordNoFormElement) {
VerifyPasswordIsSavedAndFilled("/password/no_form_element.html", VerifyPasswordIsSavedAndFilled("/password/no_form_element.html",
"username_field", "password_field", "username_field", "password_field",
"send_xhr();"); "send_xhr();");
...@@ -310,7 +310,7 @@ IN_PROC_BROWSER_TEST_P(PasswordManagerBrowserTestWithConditionalPopupViews, ...@@ -310,7 +310,7 @@ IN_PROC_BROWSER_TEST_P(PasswordManagerBrowserTestWithConditionalPopupViews,
// Check that we can fill in cases where <base href> is set and the action of // Check that we can fill in cases where <base href> is set and the action of
// the form is not set. Regression test for https://crbug.com/360230. // the form is not set. Regression test for https://crbug.com/360230.
IN_PROC_BROWSER_TEST_P(PasswordManagerBrowserTestWithConditionalPopupViews, IN_PROC_BROWSER_TEST_P(PasswordManagerBrowserTestWithConditionalPopupViews,
DISABLED_AutofillBaseTagWithNoActionTest) { AutofillBaseTagWithNoActionTest) {
std::string submit = "document.getElementById('submit_button').click();"; std::string submit = "document.getElementById('submit_button').click();";
VerifyPasswordIsSavedAndFilled("/password/password_xhr_submit.html", VerifyPasswordIsSavedAndFilled("/password/password_xhr_submit.html",
"username_field", "password_field", submit); "username_field", "password_field", submit);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment