Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(477)

Side by Side Diff: mojo/common/test/multiprocess_test_base_unittest.cc

Issue 103113002: Mojo: (POSIX) Pass channel handle to child. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « mojo/common/test/multiprocess_test_base.cc ('k') | mojo/mojo.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "mojo/common/test/multiprocess_test_base.h" 5 #include "mojo/common/test/multiprocess_test_base.h"
6 6
7 #include "base/logging.h"
8 // TODO(vtl): Remove build_config.h include when fully implemented on Windows.
9 #include "build/build_config.h"
10
7 namespace mojo { 11 namespace mojo {
8 namespace { 12 namespace {
9 13
10 class MultiprocessTestBaseTest : public test::MultiprocessTestBase { 14 class MultiprocessTestBaseTest : public test::MultiprocessTestBase {
11 }; 15 };
12 16
13 TEST_F(MultiprocessTestBaseTest, RunChild) { 17 TEST_F(MultiprocessTestBaseTest, RunChild) {
18 // TODO(vtl): Not implemented on Windows yet.
19 #if defined(OS_POSIX)
20 EXPECT_TRUE(platform_server_channel.get());
21 EXPECT_TRUE(platform_server_channel->is_valid());
22 #endif
14 StartChild("RunChild"); 23 StartChild("RunChild");
15 EXPECT_EQ(123, WaitForChildShutdown()); 24 EXPECT_EQ(123, WaitForChildShutdown());
16 } 25 }
17 26
18 MOJO_MULTIPROCESS_TEST_CHILD_MAIN(RunChild) { 27 MOJO_MULTIPROCESS_TEST_CHILD_MAIN(RunChild) {
28 // TODO(vtl): Not implemented on Windows yet.
29 #if defined(OS_POSIX)
30 CHECK(MultiprocessTestBaseTest::platform_client_channel.get());
31 CHECK(MultiprocessTestBaseTest::platform_client_channel->is_valid());
32 // TODO(vtl): Check the client channel.
33 #endif
19 return 123; 34 return 123;
20 } 35 }
21 36
22 TEST_F(MultiprocessTestBaseTest, TestChildMainNotFound) { 37 TEST_F(MultiprocessTestBaseTest, TestChildMainNotFound) {
23 StartChild("NoSuchTestChildMain"); 38 StartChild("NoSuchTestChildMain");
24 int result = WaitForChildShutdown(); 39 int result = WaitForChildShutdown();
25 EXPECT_FALSE(result >= 0 && result <= 127); 40 EXPECT_FALSE(result >= 0 && result <= 127);
26 } 41 }
27 42
28 } // namespace 43 } // namespace
29 } // namespace mojo 44 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/common/test/multiprocess_test_base.cc ('k') | mojo/mojo.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698