Chromium Code Reviews| 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/mojo/ipc_channel_mojo.h" | 5 #include "ipc/mojo/ipc_channel_mojo.h" |
| 6 | 6 |
| 7 #include "base/base_paths.h" | 7 #include "base/base_paths.h" |
| 8 #include "base/files/file.h" | 8 #include "base/files/file.h" |
| 9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| (...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 424 | 424 |
| 425 base::MessageLoop::current()->Run(); | 425 base::MessageLoop::current()->Run(); |
| 426 this->channel()->Close(); | 426 this->channel()->Close(); |
| 427 | 427 |
| 428 EXPECT_TRUE(WaitForClientShutdown()); | 428 EXPECT_TRUE(WaitForClientShutdown()); |
| 429 DestroyChannel(); | 429 DestroyChannel(); |
| 430 } | 430 } |
| 431 | 431 |
| 432 MULTIPROCESS_IPC_TEST_CLIENT_MAIN(IPCChannelMojoTestSendMessagePipeClient) { | 432 MULTIPROCESS_IPC_TEST_CLIENT_MAIN(IPCChannelMojoTestSendMessagePipeClient) { |
| 433 ListenerThatExpectsMessagePipe listener; | 433 ListenerThatExpectsMessagePipe listener; |
| 434 ChannelClient client(&listener, "IPCChannelMojoTestSendPlatformHandleClient"); | 434 ChannelClient client(&listener, "IPCChannelMojoTestSendMessagePipeClient"); |
| 435 client.Connect(); | 435 client.Connect(); |
| 436 listener.set_sender(client.channel()); | 436 listener.set_sender(client.channel()); |
| 437 | 437 |
| 438 base::MessageLoop::current()->Run(); | 438 base::MessageLoop::current()->Run(); |
| 439 | 439 |
| 440 client.Close(); | 440 client.Close(); |
| 441 | 441 |
| 442 return 0; | 442 return 0; |
| 443 } | 443 } |
| 444 | 444 |
| (...skipping 30 matching lines...) Expand all Loading... | |
| 475 // Set up IPC channel and start client. | 475 // Set up IPC channel and start client. |
| 476 ListenerExpectingErrors listener; | 476 ListenerExpectingErrors listener; |
| 477 CreateChannel(&listener); | 477 CreateChannel(&listener); |
| 478 ASSERT_TRUE(ConnectChannel()); | 478 ASSERT_TRUE(ConnectChannel()); |
| 479 | 479 |
| 480 ASSERT_TRUE(StartClient()); | 480 ASSERT_TRUE(StartClient()); |
| 481 base::MessageLoop::current()->Run(); | 481 base::MessageLoop::current()->Run(); |
| 482 | 482 |
| 483 this->channel()->Close(); | 483 this->channel()->Close(); |
| 484 | 484 |
| 485 // WaitForClientShutdown() fails as client_hanadle() is already | 485 // TODO(morrita): We need loseHandle() call on DidStartClient(), |
|
viettrungluu
2015/03/04 22:12:41
I think you mean "CloseHandle"?
(Also "on" -> "in
Hajime Morrita
2015/03/04 23:09:07
Done.
| |
| 486 // closed. | 486 // which has been disabled since crrev.com/843113003, to |
|
viettrungluu
2015/03/04 22:12:41
Sorry, what has been disabled exactly?
(Also, "to
Hajime Morrita
2015/03/04 23:09:07
The series of CLs is apparently attempting to wrap
| |
| 487 EXPECT_FALSE(WaitForClientShutdown()); | 487 // make this fail. |
| 488 // EXPECT_FALSE(WaitForClientShutdown()); | |
|
viettrungluu
2015/03/04 22:12:41
Could you file a bug and put the bug number/URL in
Hajime Morrita
2015/03/04 23:09:07
Done.
| |
| 489 WaitForClientShutdown(); | |
| 488 EXPECT_TRUE(listener.has_error()); | 490 EXPECT_TRUE(listener.has_error()); |
| 489 | 491 |
| 490 DestroyChannel(); | 492 DestroyChannel(); |
| 491 } | 493 } |
| 492 | 494 |
| 493 MULTIPROCESS_IPC_TEST_CLIENT_MAIN(IPCChannelMojoTestDoNothingClient) { | 495 MULTIPROCESS_IPC_TEST_CLIENT_MAIN(IPCChannelMojoTestDoNothingClient) { |
| 494 ListenerThatQuits listener; | 496 ListenerThatQuits listener; |
| 495 ChannelClient client(&listener, "IPCChannelMojoTestDoNothingClient"); | 497 ChannelClient client(&listener, "IPCChannelMojoTestDoNothingClient"); |
| 496 client.Connect(); | 498 client.Connect(); |
| 497 | 499 |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 666 base::MessageLoop::current()->Run(); | 668 base::MessageLoop::current()->Run(); |
| 667 | 669 |
| 668 client.Close(); | 670 client.Close(); |
| 669 | 671 |
| 670 return 0; | 672 return 0; |
| 671 } | 673 } |
| 672 | 674 |
| 673 #endif // OS_LINUX | 675 #endif // OS_LINUX |
| 674 | 676 |
| 675 } // namespace | 677 } // namespace |
| OLD | NEW |