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

Unified Diff: util/test/multiprocess_test.cc

Issue 506143002: Refactor MachMultiprocess (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Created 6 years, 4 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 | « util/test/multiprocess.cc ('k') | util/util.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: util/test/multiprocess_test.cc
diff --git a/util/test/mac/mach_multiprocess_test.cc b/util/test/multiprocess_test.cc
similarity index 75%
copy from util/test/mac/mach_multiprocess_test.cc
copy to util/test/multiprocess_test.cc
index a8639978f764e7a6a93470862ffe0cdabdef0469..53b60ef0f60878061c8379e3004f40b70fd35cf9 100644
--- a/util/test/mac/mach_multiprocess_test.cc
+++ b/util/test/multiprocess_test.cc
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "util/test/mac/mach_multiprocess.h"
+#include "util/test/multiprocess.h"
#include <unistd.h>
@@ -26,17 +26,14 @@ namespace {
using namespace crashpad;
using namespace crashpad::test;
-class TestMachMultiprocess final : public MachMultiprocess {
+class TestMultiprocess final : public Multiprocess {
public:
- TestMachMultiprocess() : MachMultiprocess() {}
+ TestMultiprocess() : Multiprocess() {}
- ~TestMachMultiprocess() {}
+ ~TestMultiprocess() {}
- protected:
- // The base class will have already exercised the Mach ports for IPC and the
- // child task port. Just make sure that the pipe is set up correctly and that
- // ChildPID() works as expected.
- virtual void Parent() override {
+ private:
+ virtual void MultiprocessParent() override {
int read_fd = ReadPipeFD();
char c;
ssize_t rv = ReadFD(read_fd, &c, 1);
@@ -59,7 +56,7 @@ class TestMachMultiprocess final : public MachMultiprocess {
ASSERT_EQ(0, rv) << ErrnoMessage("read");
}
- virtual void Child() override {
+ virtual void MultiprocessChild() override {
int write_fd = WritePipeFD();
char c = 'M';
@@ -76,13 +73,12 @@ class TestMachMultiprocess final : public MachMultiprocess {
EXPECT_EQ('m', c);
}
- private:
- DISALLOW_COPY_AND_ASSIGN(TestMachMultiprocess);
+ DISALLOW_COPY_AND_ASSIGN(TestMultiprocess);
};
-TEST(MachMultiprocess, MachMultiprocess) {
- TestMachMultiprocess mach_multiprocess;
- mach_multiprocess.Run();
+TEST(Multiprocess, Multiprocess) {
+ TestMultiprocess multiprocess;
+ multiprocess.Run();
}
} // namespace
« no previous file with comments | « util/test/multiprocess.cc ('k') | util/util.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698