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

Unified Diff: base/multiprocess_test.h

Issue 8864: 1) Add a new MULTIPROCESS_TEST_MAIN macro to store child process names... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 2 months 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 | « base/base_unittests.scons ('k') | base/port.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/multiprocess_test.h
===================================================================
--- base/multiprocess_test.h (revision 4068)
+++ base/multiprocess_test.h (working copy)
@@ -10,6 +10,7 @@
#include "base/process_util.h"
#include "base/string_util.h"
#include "testing/gtest/include/gtest/gtest.h"
+#include "testing/multiprocess_func_list.h"
#if defined(OS_POSIX)
#include <sys/types.h>
@@ -26,21 +27,15 @@
// To create a multiprocess test simply follow these steps:
//
// 1) Derive your test from MultiProcessTest.
-// 2) Modify your mainline so that if it sees the
-// kRunClientProcess switch, it will deal with it.
-// 3) Create a mainline function for the child processes
-// 4) Call SpawnChild("foo"), where "foo" is the name of
+// 2) Create a mainline function for the child processes and include
+// testing/multiprocess_func_list.h.
+// See the declaration of the MULTIPROCESS_TEST_MAIN macro
+// in that file for an example.
+// 3) Call SpawnChild("foo"), where "foo" is the name of
// the function you wish to run in the child processes.
-// 5) On Linux, add the function's name to the list in the file
-// base_unittests_exported_symbols.version
// That's it!
//
class MultiProcessTest : public PlatformTest {
- public:
- // Prototype function for a client function. Multi-process
- // clients must provide a callback with this signature to run.
- typedef int (*ChildFunctionPtr)();
-
protected:
// Run a child process.
// 'procname' is the name of a function which the child will
@@ -79,4 +74,3 @@
};
#endif // BASE_MULTIPROCESS_TEST_H__
-
« no previous file with comments | « base/base_unittests.scons ('k') | base/port.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698