| OLD | NEW | 
|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be | 
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. | 
| 4 | 4 | 
| 5 #include "ipc/ipc_channel_mojo.h" | 5 #include "ipc/ipc_channel_mojo.h" | 
| 6 | 6 | 
| 7 #include <stddef.h> | 7 #include <stddef.h> | 
| 8 #include <stdint.h> | 8 #include <stdint.h> | 
| 9 | 9 | 
| 10 #include <memory> | 10 #include <memory> | 
| (...skipping 1282 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1293   } | 1293   } | 
| 1294 }; | 1294 }; | 
| 1295 | 1295 | 
| 1296 TEST_F(IPCChannelMojoTest, VerifyGlobalPid) { | 1296 TEST_F(IPCChannelMojoTest, VerifyGlobalPid) { | 
| 1297   InitWithMojo("IPCChannelMojoTestVerifyGlobalPidClient"); | 1297   InitWithMojo("IPCChannelMojoTestVerifyGlobalPidClient"); | 
| 1298 | 1298 | 
| 1299   ListenerThatVerifiesPeerPid listener; | 1299   ListenerThatVerifiesPeerPid listener; | 
| 1300   CreateChannel(&listener); | 1300   CreateChannel(&listener); | 
| 1301   ASSERT_TRUE(ConnectChannel()); | 1301   ASSERT_TRUE(ConnectChannel()); | 
| 1302 | 1302 | 
| 1303   base::MessageLoop::current()->Run(); | 1303   base::RunLoop().Run(); | 
| 1304   channel()->Close(); | 1304   channel()->Close(); | 
| 1305 | 1305 | 
| 1306   EXPECT_TRUE(WaitForClientShutdown()); | 1306   EXPECT_TRUE(WaitForClientShutdown()); | 
| 1307   DestroyChannel(); | 1307   DestroyChannel(); | 
| 1308 } | 1308 } | 
| 1309 | 1309 | 
| 1310 DEFINE_IPC_CHANNEL_MOJO_TEST_CLIENT(IPCChannelMojoTestVerifyGlobalPidClient, | 1310 DEFINE_IPC_CHANNEL_MOJO_TEST_CLIENT(IPCChannelMojoTestVerifyGlobalPidClient, | 
| 1311                                     ChannelClient) { | 1311                                     ChannelClient) { | 
| 1312   IPC::Channel::SetGlobalPid(kMagicChildId); | 1312   IPC::Channel::SetGlobalPid(kMagicChildId); | 
| 1313   ListenerThatQuits listener; | 1313   ListenerThatQuits listener; | 
| 1314   Connect(&listener); | 1314   Connect(&listener); | 
| 1315 | 1315 | 
| 1316   base::MessageLoop::current()->Run(); | 1316   base::RunLoop().Run(); | 
| 1317 | 1317 | 
| 1318   Close(); | 1318   Close(); | 
| 1319 } | 1319 } | 
| 1320 | 1320 | 
| 1321 #endif  // OS_LINUX | 1321 #endif  // OS_LINUX | 
| 1322 | 1322 | 
| 1323 }  // namespace | 1323 }  // namespace | 
| OLD | NEW | 
|---|