diff options
-rw-r--r-- | sandbox/mac/bootstrap_sandbox_unittest.mm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sandbox/mac/bootstrap_sandbox_unittest.mm b/sandbox/mac/bootstrap_sandbox_unittest.mm index fb389237..8bfbf32 100644 --- a/sandbox/mac/bootstrap_sandbox_unittest.mm +++ b/sandbox/mac/bootstrap_sandbox_unittest.mm @@ -311,7 +311,12 @@ TEST_F(BootstrapSandboxTest, ForwardMessageInProcess) { send_rights = 0; ASSERT_EQ(KERN_SUCCESS, mach_port_get_refs(task, port, MACH_PORT_RIGHT_SEND, &send_rights)); - EXPECT_EQ(2u, send_rights); + // On 10.6, bootstrap_lookup2 may add an extra right to place it in a per- + // process cache. + if (base::mac::IsOSSnowLeopard()) + EXPECT_TRUE(send_rights == 3u || send_rights == 2u) << send_rights; + else + EXPECT_EQ(2u, send_rights); } } // namespace sandbox |