Fix an element value check in PasswordManager interactive tests.
Bug: 849582
Change-Id: I6e75d9a62b4b58569c2c29b913c0a6a0cab0bf83
Reviewed-on: https://chromium-review.googlesource.com/1139057
Reviewed-by: Vasilii Sukhanov <vasilii@chromium.org>
Commit-Queue: Alexey Khoroshilov <sense@yandex-team.ru>
Cr-Commit-Position: refs/heads/master@{#575584}
diff --git a/chrome/browser/password_manager/password_manager_interactive_test_base.cc b/chrome/browser/password_manager/password_manager_interactive_test_base.cc
index cc15f49..2365888e 100644
--- a/chrome/browser/password_manager/password_manager_interactive_test_base.cc
+++ b/chrome/browser/password_manager/password_manager_interactive_test_base.cc
@@ -36,6 +36,8 @@
ui::DomCodeToUsLayoutKeyboardCode(dom_code),
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(
diff --git a/chrome/browser/password_manager/password_manager_interactive_uitest.cc b/chrome/browser/password_manager/password_manager_interactive_uitest.cc
index fd376b5..f7ee8ab 100644
--- a/chrome/browser/password_manager/password_manager_interactive_uitest.cc
+++ b/chrome/browser/password_manager/password_manager_interactive_uitest.cc
@@ -281,7 +281,7 @@
// Tests that if a site embeds the login and signup forms into one <form>, the
// login form still gets autofilled.
IN_PROC_BROWSER_TEST_P(PasswordManagerBrowserTestWithConditionalPopupViews,
- DISABLED_AutofillLoginSignupForm) {
+ AutofillLoginSignupForm) {
std::string submit = "document.getElementById('submit').click();";
VerifyPasswordIsSavedAndFilled("/password/login_signup_form.html", "username",
"password", submit);
@@ -291,7 +291,7 @@
// Tests that password suggestions still work if the fields have the
// "autocomplete" attribute set to off.
IN_PROC_BROWSER_TEST_P(PasswordManagerBrowserTestWithConditionalPopupViews,
- DISABLED_AutofillPasswordFormWithAutocompleteOff) {
+ AutofillPasswordFormWithAutocompleteOff) {
std::string submit = "document.getElementById('submit').click();";
VerifyPasswordIsSavedAndFilled(
"/password/password_autocomplete_off_test.html", "username", "password",
@@ -300,7 +300,7 @@
// Disabled for flakiness crbug.com/849582.
IN_PROC_BROWSER_TEST_P(PasswordManagerBrowserTestWithConditionalPopupViews,
- DISABLED_AutofillPasswordNoFormElement) {
+ AutofillPasswordNoFormElement) {
VerifyPasswordIsSavedAndFilled("/password/no_form_element.html",
"username_field", "password_field",
"send_xhr();");
@@ -310,7 +310,7 @@
// 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.
IN_PROC_BROWSER_TEST_P(PasswordManagerBrowserTestWithConditionalPopupViews,
- DISABLED_AutofillBaseTagWithNoActionTest) {
+ AutofillBaseTagWithNoActionTest) {
std::string submit = "document.getElementById('submit_button').click();";
VerifyPasswordIsSavedAndFilled("/password/password_xhr_submit.html",
"username_field", "password_field", submit);