| Index: chrome/browser/password_manager/credential_manager_browsertest.cc
|
| diff --git a/chrome/browser/password_manager/credential_manager_browsertest.cc b/chrome/browser/password_manager/credential_manager_browsertest.cc
|
| index 978620b2821d5e49f899747b22aa1efc1b773365..388d76429db472803a46f02b4f8683636612eed3 100644
|
| --- a/chrome/browser/password_manager/credential_manager_browsertest.cc
|
| +++ b/chrome/browser/password_manager/credential_manager_browsertest.cc
|
| @@ -117,16 +117,9 @@ IN_PROC_BROWSER_TEST_F(CredentialManagerBrowserTest,
|
| EXPECT_FALSE(form.skip_zero_click);
|
| }
|
|
|
| -// TODO(crbug.com/626759): flakily failing on Mac.
|
| -#if defined(OS_MACOSX)
|
| -#define MAYBE_AutoSigninOldCredentialAndNavigation \
|
| - DISABLED_AutoSigninOldCredentialAndNavigation
|
| -#else
|
| -#define MAYBE_AutoSigninOldCredentialAndNavigation \
|
| - AutoSigninOldCredentialAndNavigation
|
| -#endif
|
| +
|
| IN_PROC_BROWSER_TEST_F(CredentialManagerBrowserTest,
|
| - MAYBE_AutoSigninOldCredentialAndNavigation) {
|
| + AutoSigninOldCredentialAndNavigation) {
|
| // Save credentials with 'skip_zero_click' false.
|
| scoped_refptr<password_manager::TestPasswordStore> password_store =
|
| static_cast<password_manager::TestPasswordStore*>(
|
| @@ -150,11 +143,15 @@ IN_PROC_BROWSER_TEST_F(CredentialManagerBrowserTest,
|
| "document.getElementById('password_field').value = 'trash';";
|
| ASSERT_TRUE(content::ExecuteScript(RenderViewHost(), fill_password));
|
|
|
| - // Call the API to trigger the notification to the client.
|
| + // Call the API with a delay to trigger the notification to the client. The
|
| + // delay ensures that parsing password forms won't happen again after the API
|
| + // call making the test flaky.
|
| ASSERT_TRUE(content::ExecuteScript(
|
| RenderViewHost(),
|
| - "navigator.credentials.get({password: true})"
|
| - ".then(cred => window.location = '/password/done.html')"));
|
| + "setTimeout( function() {"
|
| + "navigator.credentials.get({password: true})"
|
| + ".then(cred => window.location = '/password/done.html');"
|
| + "}, 1000)"));
|
|
|
| NavigationObserver observer(WebContents());
|
| observer.SetPathToWaitFor("/password/done.html");
|
|
|