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 |