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

Unified Diff: mojo/common/test/multiprocess_test_base_unittest.cc

Issue 99473007: Mojo: Add a Mojo-specific multiprocess test base class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comment + win fix 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/common/test/multiprocess_test_base.cc ('k') | mojo/mojo.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/common/test/multiprocess_test_base_unittest.cc
diff --git a/mojo/common/test/multiprocess_test_base_unittest.cc b/mojo/common/test/multiprocess_test_base_unittest.cc
new file mode 100644
index 0000000000000000000000000000000000000000..681d8bc453bb5055d6fef384f24c28a4efe8bee6
--- /dev/null
+++ b/mojo/common/test/multiprocess_test_base_unittest.cc
@@ -0,0 +1,29 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "mojo/common/test/multiprocess_test_base.h"
+
+namespace mojo {
+namespace {
+
+class MultiprocessTestBaseTest : public test::MultiprocessTestBase {
+};
+
+TEST_F(MultiprocessTestBaseTest, RunChild) {
+ StartChild("RunChild");
+ EXPECT_EQ(123, WaitForChildShutdown());
+}
+
+MOJO_MULTIPROCESS_TEST_CHILD_MAIN(RunChild) {
+ return 123;
+}
+
+TEST_F(MultiprocessTestBaseTest, TestChildMainNotFound) {
+ StartChild("NoSuchTestChildMain");
+ int result = WaitForChildShutdown();
+ EXPECT_FALSE(result >= 0 && result <= 127);
+}
+
+} // namespace
+} // namespace mojo
« 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