[gardener] Disable some flaky password manager tests on Mac

Bug: 326170284
Change-Id: I0735450439a2eec2f995b6122ef286967302c62e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5317149
Commit-Queue: Victor Vianna <victorvianna@google.com>
Commit-Queue: Mikel Astiz <mastiz@chromium.org>
Owners-Override: Victor Vianna <victorvianna@google.com>
Auto-Submit: Victor Vianna <victorvianna@google.com>
Reviewed-by: Mikel Astiz <mastiz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1263867}
diff --git a/chrome/browser/password_manager/credential_manager_browsertest.cc b/chrome/browser/password_manager/credential_manager_browsertest.cc
index 2052e62..cabc9ae 100644
--- a/chrome/browser/password_manager/credential_manager_browsertest.cc
+++ b/chrome/browser/password_manager/credential_manager_browsertest.cc
@@ -267,9 +267,16 @@
 };
 
 // Tests.
-
+// TODO(crbug.com/326170284) Flaky on Mac, fix and re-enable.
+#if BUILDFLAG(IS_MAC)
+#define MAYBE_AccountChooserWithOldCredentialAndNavigation \
+  DISABLED_AccountChooserWithOldCredentialAndNavigation
+#else
+#define MAYBE_AccountChooserWithOldCredentialAndNavigation \
+  AccountChooserWithOldCredentialAndNavigation
+#endif
 IN_PROC_BROWSER_TEST_F(CredentialManagerBrowserTest,
-                       AccountChooserWithOldCredentialAndNavigation) {
+                       MAYBE_AccountChooserWithOldCredentialAndNavigation) {
   // Save credentials with 'skip_zero_click'.
   scoped_refptr<password_manager::TestPasswordStore> password_store =
       static_cast<password_manager::TestPasswordStore*>(
@@ -411,8 +418,16 @@
   }
 }
 
+// TODO(crbug.com/326170284) Flaky on Mac, fix and re-enable.
+#if BUILDFLAG(IS_MAC)
+#define MAYBE_StoreUpdatesPasswordOfExistingCredential \
+  DISABLED_StoreUpdatesPasswordOfExistingCredential
+#else
+#define MAYBE_StoreUpdatesPasswordOfExistingCredential \
+  StoreUpdatesPasswordOfExistingCredential
+#endif
 IN_PROC_BROWSER_TEST_F(CredentialManagerBrowserTest,
-                       StoreUpdatesPasswordOfExistingCredential) {
+                       MAYBE_StoreUpdatesPasswordOfExistingCredential) {
   scoped_refptr<password_manager::TestPasswordStore> password_store =
       static_cast<password_manager::TestPasswordStore*>(
           ProfilePasswordStoreFactory::GetForProfile(
@@ -712,8 +727,16 @@
   EXPECT_EQ(u"P4SSW0RD", passwords[www_url.spec()].front().password_value);
 }
 
+// TODO(crbug.com/326170284) Flaky on Mac, fix and re-enable.
+#if BUILDFLAG(IS_MAC)
+#define MAYBE_ObsoleteHttpCredentialMovedOnMigrationToHstsSite \
+  DISABLED_ObsoleteHttpCredentialMovedOnMigrationToHstsSite
+#else
+#define MAYBE_ObsoleteHttpCredentialMovedOnMigrationToHstsSite \
+  ObsoleteHttpCredentialMovedOnMigrationToHstsSite
+#endif
 IN_PROC_BROWSER_TEST_F(CredentialManagerBrowserTest,
-                       ObsoleteHttpCredentialMovedOnMigrationToHstsSite) {
+                       MAYBE_ObsoleteHttpCredentialMovedOnMigrationToHstsSite) {
   // Add an http credential to the password store.
   GURL https_origin = https_test_server().base_url();
   ASSERT_TRUE(https_origin.SchemeIs(url::kHttpsScheme));
diff --git a/chrome/browser/password_manager/password_manager_browsertest.cc b/chrome/browser/password_manager/password_manager_browsertest.cc
index 7e0557abf..23a07b2 100644
--- a/chrome/browser/password_manager/password_manager_browsertest.cc
+++ b/chrome/browser/password_manager/password_manager_browsertest.cc
@@ -2827,7 +2827,14 @@
 // When there are multiple HttpAuthObservers (e.g., multiple HTTP auth dialogs
 // as in http://crbug.com/537823), ensure that credentials from PasswordStore
 // distributed to them are filtered by the realm.
-IN_PROC_BROWSER_TEST_F(PasswordManagerBrowserTest, BasicAuthSeparateRealms) {
+// TODO(crbug.com/326170284) Flaky on Mac, fix and re-enable.
+#if BUILDFLAG(IS_MAC)
+#define MAYBE_BasicAuthSeparateRealms DISABLED_BasicAuthSeparateRealms
+#else
+#define MAYBE_BasicAuthSeparateRealms BasicAuthSeparateRealms
+#endif
+IN_PROC_BROWSER_TEST_F(PasswordManagerBrowserTest,
+                       MAYBE_BasicAuthSeparateRealms) {
   // We must use a new test server here because embedded_test_server() is
   // already started at this point and adding the request handler to it would
   // not be thread safe.
@@ -3087,8 +3094,16 @@
 
 // Tests that no bubble shown when a password form without username submitted
 // and there is stored credentials with the same password.
+// TODO(crbug.com/326170284) Flaky on Mac, fix and re-enable.
+#if BUILDFLAG(IS_MAC)
+#define MAYBE_PasswordRetryFormNoBubbleWhenPasswordTheSame \
+  DISABLED_PasswordRetryFormNoBubbleWhenPasswordTheSame
+#else
+#define MAYBE_PasswordRetryFormNoBubbleWhenPasswordTheSame \
+  PasswordRetryFormNoBubbleWhenPasswordTheSame
+#endif
 IN_PROC_BROWSER_TEST_F(PasswordManagerBrowserTest,
-                       PasswordRetryFormNoBubbleWhenPasswordTheSame) {
+                       MAYBE_PasswordRetryFormNoBubbleWhenPasswordTheSame) {
   // At first let us save credentials to the PasswordManager.
   password_manager::PasswordStoreInterface* password_store =
       ProfilePasswordStoreFactory::GetForProfile(
@@ -4761,8 +4776,16 @@
   }
 }
 
+// TODO(crbug.com/326170284) Flaky on Mac, fix and re-enable.
+#if BUILDFLAG(IS_MAC)
+#define MAYBE_DisablePasswordManagerOnCredentiallessIframe \
+  DISABLED_DisablePasswordManagerOnCredentiallessIframe
+#else
+#define MAYBE_DisablePasswordManagerOnCredentiallessIframe \
+  DisablePasswordManagerOnCredentiallessIframe
+#endif
 IN_PROC_BROWSER_TEST_F(PasswordManagerCredentiallessIframeTest,
-                       DisablePasswordManagerOnCredentiallessIframe) {
+                       MAYBE_DisablePasswordManagerOnCredentiallessIframe) {
   GURL base_url = https_test_server().GetURL("a.test", "/");
   GURL main_frame_url = https_test_server().GetURL(
       "a.test", "/password/password_form_in_credentialless_iframe.html");