Disable OzonePlatformTest.ExitsGracefullyOnPlatormInitFailure on ASan/LSan

Disable the test on Linux ASan Tests (sandboxed) and
Linux ASan LSan Tests (1) builder. The test is failing every day on
these two builders during teardown.

Bug: 1430388
Change-Id: I8e762f00223643c62c543ffacf1bd8697187e056
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4528138
Reviewed-by: Avi Drissman <[email protected]>
Commit-Queue: Kuan Huang <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1143583}
diff --git a/chrome/browser/ozone_platform_browsertest.cc b/chrome/browser/ozone_platform_browsertest.cc
index a025045..e6e812d 100644
--- a/chrome/browser/ozone_platform_browsertest.cc
+++ b/chrome/browser/ozone_platform_browsertest.cc
@@ -23,7 +23,17 @@
   }
 };
 
-IN_PROC_BROWSER_TEST_F(OzonePlatformTest, ExitsGracefullyOnPlatormInitFailure) {
+// TODO(crbug.com/1430388) Flaky during teardown on linux ASan/LSan builder.
+#if BUILDFLAG(IS_LINUX) && \
+    (defined(ADDRESS_SANITIZER) || defined(LEAK_SANITIZER))
+#define MAYBE_ExitsGracefullyOnPlatormInitFailure \
+  DISABLED_ExitsGracefullyOnPlatormInitFailure
+#else
+#define MAYBE_ExitsGracefullyOnPlatormInitFailure \
+  ExitsGracefullyOnPlatormInitFailure
+#endif
+IN_PROC_BROWSER_TEST_F(OzonePlatformTest,
+                       MAYBE_ExitsGracefullyOnPlatormInitFailure) {
   // This should never be hit.  The browser is expected to exit before entering
   // the test body.
   ASSERT_TRUE(false);