Index: net/socket/unix_domain_server_socket_posix_unittest.cc |
diff --git a/net/socket/unix_domain_server_socket_posix_unittest.cc b/net/socket/unix_domain_server_socket_posix_unittest.cc |
index 07209f6605657757cd97378615cefb8d4de6f4ac..14ecfd0723d4bc734b117ec8e20f77bce3d6aaa4 100644 |
--- a/net/socket/unix_domain_server_socket_posix_unittest.cc |
+++ b/net/socket/unix_domain_server_socket_posix_unittest.cc |
@@ -24,8 +24,13 @@ namespace { |
const char kSocketFilename[] = "socket_for_testing"; |
const char kInvalidSocketPath[] = "/invalid/path"; |
-bool UserCanConnectCallback(bool allow_user, uid_t uid, gid_t gid) { |
+bool UserCanConnectCallback(bool allow_user, pid_t pid, uid_t uid, gid_t gid) { |
// Here peers are running in same process. |
+#if defined(OS_LINUX) || defined(OS_ANDROID) |
+ EXPECT_EQ(getpid(), pid); |
+#else |
+ EXPECT_EQ(0, pid); |
+#endif |
EXPECT_EQ(getuid(), uid); |
EXPECT_EQ(getgid(), gid); |
return allow_user; |