Commit 557416cf authored by Vasilii Sukhanov's avatar Vasilii Sukhanov Committed by Commit Bot

Reenable PromptForXHRWithoutOnSubmit and PromptForFetchWithNewPasswordsWithoutOnSubmit tests

The two probable reasons for the flakiness were:
- we didn't wait until the keystrokes were processed in the renderer. See
crbug.com/955455
- we don't wait for the password store returning some results after navigation.

Both are fixed in the CL. Let's observe the pass rate.

Bug: 1013743
Change-Id: Ic328afbe2cd652119a773c28d49ff450cf0d5405
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1879237Reviewed-by: default avatarDominic Battré <battre@chromium.org>
Commit-Queue: Vasilii Sukhanov <vasilii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#709464}
parent 9fd5a9d7
......@@ -179,19 +179,18 @@ IN_PROC_BROWSER_TEST_F(PasswordManagerInteractiveTest,
prompt_observer.WaitForManagementState();
}
// Flaky. https://crbug.com/1013743
IN_PROC_BROWSER_TEST_F(PasswordManagerInteractiveTest,
DISABLED_PromptForXHRWithoutOnSubmit) {
PromptForXHRWithoutOnSubmit) {
NavigateToFile("/password/password_xhr_submit.html");
// Verify that if XHR navigation occurs and the form is properly filled out,
// we try and save the password even though onsubmit hasn't been called.
FillElementWithValue("username_field", "user");
FillElementWithValue("password_field", "1234");
NavigationObserver observer(WebContents());
// Make sure that the keystrokes were processed.
WaitForElementValue("password_field", "1234");
ASSERT_TRUE(content::ExecuteScript(WebContents(), "send_xhr()"));
observer.Wait();
EXPECT_TRUE(BubbleObserver(WebContents()).IsSavePromptShownAutomatically());
BubbleObserver(WebContents()).WaitForAutomaticSavePrompt();
}
IN_PROC_BROWSER_TEST_F(PasswordManagerInteractiveTest,
......@@ -227,9 +226,8 @@ IN_PROC_BROWSER_TEST_F(PasswordManagerInteractiveTest,
EXPECT_TRUE(BubbleObserver(WebContents()).IsSavePromptShownAutomatically());
}
// Flaky. https://crbug.com/1013743
IN_PROC_BROWSER_TEST_F(PasswordManagerInteractiveTest,
DISABLED_PromptForFetchWithNewPasswordsWithoutOnSubmit) {
PromptForFetchWithNewPasswordsWithoutOnSubmit) {
NavigateToFile("/password/password_fetch_submit.html");
// Verify that if Fetch navigation occurs and the form is properly filled out,
......@@ -239,10 +237,10 @@ IN_PROC_BROWSER_TEST_F(PasswordManagerInteractiveTest,
FillElementWithValue("signup_username_field", "user");
FillElementWithValue("signup_password_field", "1234");
FillElementWithValue("confirmation_password_field", "1234");
NavigationObserver observer(WebContents());
// Make sure that the keystrokes were processed.
WaitForElementValue("confirmation_password_field", "1234");
ASSERT_TRUE(content::ExecuteScript(WebContents(), "send_fetch()"));
observer.Wait();
EXPECT_TRUE(BubbleObserver(WebContents()).IsSavePromptShownAutomatically());
BubbleObserver(WebContents()).WaitForAutomaticSavePrompt();
}
// Disabled for flakiness crbug.com/849582.
......
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