Disable CancelableSyncSocketTest.ShutdownCancelsReceive on mac

The test is flaky on mac.

Bug: 361250560
Change-Id: I65effa120f21b2041d0e4951f677ef5f950e9b11
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5804264
Auto-Submit: Kevin McNee <[email protected]>
Commit-Queue: Daniel Cheng <[email protected]>
Reviewed-by: Daniel Cheng <[email protected]>
Commit-Queue: Kevin McNee <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1344855}
diff --git a/base/sync_socket_unittest.cc b/base/sync_socket_unittest.cc
index 67a68d8d..9e6e77be 100644
--- a/base/sync_socket_unittest.cc
+++ b/base/sync_socket_unittest.cc
@@ -10,6 +10,7 @@
 #include "base/threading/platform_thread.h"
 #include "base/threading/simple_thread.h"
 #include "base/time/time.h"
+#include "build/build_config.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
 namespace base {
@@ -145,7 +146,13 @@
   SendReceivePeek(&socket_c, &socket_d);
 }
 
-TEST_F(CancelableSyncSocketTest, ShutdownCancelsReceive) {
+// TODO(https://crbug.com/361250560): Flaky on mac.
+#if BUILDFLAG(IS_MAC)
+#define MAYBE_ShutdownCancelsReceive DISABLED_ShutdownCancelsReceive
+#else
+#define MAYBE_ShutdownCancelsReceive ShutdownCancelsReceive
+#endif
+TEST_F(CancelableSyncSocketTest, MAYBE_ShutdownCancelsReceive) {
   HangingReceiveThread thread(&socket_b_, /* with_timeout = */ false);
 
   // Wait for the thread to be started. Note that this doesn't guarantee that