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

Unified Diff: mojo/edk/embedder/embedder_unittest.cc

Issue 1897623002: Remove POSIX shared memory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase against https://codereview.chromium.org/1890043002/. Created 4 years, 8 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 | « ipc/ipc_message_utils.cc ('k') | mojo/edk/embedder/platform_shared_buffer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/embedder/embedder_unittest.cc
diff --git a/mojo/edk/embedder/embedder_unittest.cc b/mojo/edk/embedder/embedder_unittest.cc
index b21d898e23b9318d281b5893ec8a5d25fe7746a5..8a04fbc1fa7d34f5f2922d49012da214805fc409 100644
--- a/mojo/edk/embedder/embedder_unittest.cc
+++ b/mojo/edk/embedder/embedder_unittest.cc
@@ -303,9 +303,6 @@ TEST_F(EmbedderTest, MAYBE_MultiprocessBaseSharedMemory) {
// from it.
base::SharedMemoryCreateOptions options;
options.size = 123;
-#if defined(OS_MACOSX) && !defined(OS_IOS)
- options.type = base::SharedMemoryHandle::POSIX;
-#endif
base::SharedMemory shared_memory;
ASSERT_TRUE(shared_memory.Create(options));
base::SharedMemoryHandle shm_handle = base::SharedMemory::DuplicateHandle(
@@ -424,7 +421,6 @@ TEST_F(EmbedderTest, MultiprocessMachSharedMemory) {
}
enum class HandleType {
- POSIX,
Anand Mistry (off Chromium) 2016/04/16 01:27:54 Please restore this. I changed the test so it no l
erikchen 2016/04/18 17:14:39 Done.
MACH,
MACH_NULL,
};
@@ -432,8 +428,6 @@ enum class HandleType {
const HandleType kTestHandleTypes[] = {
HandleType::MACH,
HandleType::MACH_NULL,
- HandleType::POSIX,
- HandleType::POSIX,
HandleType::MACH,
};
@@ -446,14 +440,7 @@ TEST_F(EmbedderTest, MultiprocessMixMachAndFds) {
for (size_t i = 0; i < arraysize(kTestHandleTypes); i++) {
const auto type = kTestHandleTypes[i];
ScopedPlatformHandle scoped_handle;
- if (type == HandleType::POSIX) {
- // The easiest source of fds is opening /dev/null.
- base::File file(base::FilePath("/dev/null"),
- base::File::FLAG_OPEN | base::File::FLAG_WRITE);
- ASSERT_TRUE(file.IsValid());
- scoped_handle.reset(PlatformHandle(file.TakePlatformFile()));
- EXPECT_EQ(PlatformHandle::Type::POSIX, scoped_handle.get().type);
- } else if (type == HandleType::MACH_NULL) {
+ if (type == HandleType::MACH_NULL) {
scoped_handle.reset(PlatformHandle(
static_cast<mach_port_t>(MACH_PORT_NULL)));
EXPECT_EQ(PlatformHandle::Type::MACH, scoped_handle.get().type);
@@ -497,10 +484,7 @@ DEFINE_TEST_CLIENT_TEST_WITH_PIPE(MultiprocessMixMachAndFdsClient, EmbedderTest,
ScopedPlatformHandle scoped_handle;
ASSERT_EQ(MOJO_RESULT_OK,
PassWrappedPlatformHandle(platform_handles[i], &scoped_handle));
- if (type == HandleType::POSIX) {
- EXPECT_NE(0, scoped_handle.get().handle);
- EXPECT_EQ(PlatformHandle::Type::POSIX, scoped_handle.get().type);
- } else if (type == HandleType::MACH_NULL) {
+ if (type == HandleType::MACH_NULL) {
EXPECT_EQ(static_cast<mach_port_t>(MACH_PORT_NULL),
scoped_handle.get().port);
EXPECT_EQ(PlatformHandle::Type::MACH, scoped_handle.get().type);
« no previous file with comments | « ipc/ipc_message_utils.cc ('k') | mojo/edk/embedder/platform_shared_buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698