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

Unified Diff: mojo/edk/system/platform_wrapper_unittest.cc

Issue 2843113002: make base::SharedMemoryHandle a class on POSIX. (Closed)
Patch Set: Fix test error. Created 3 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
Index: mojo/edk/system/platform_wrapper_unittest.cc
diff --git a/mojo/edk/system/platform_wrapper_unittest.cc b/mojo/edk/system/platform_wrapper_unittest.cc
index f29d62b04fb03d481d48066908a5fb163422354c..a6d4be37c3b85b42cdd5e3f24657fd317e1a5f6e 100644
--- a/mojo/edk/system/platform_wrapper_unittest.cc
+++ b/mojo/edk/system/platform_wrapper_unittest.cc
@@ -125,7 +125,7 @@ TEST_F(PlatformWrapperTest, WrapPlatformSharedBufferHandle) {
#if defined(OS_MACOSX) && !defined(OS_IOS)
os_buffer.value = static_cast<uint64_t>(memory_handle.GetMemoryObject());
#elif defined(OS_POSIX)
- os_buffer.value = static_cast<uint64_t>(memory_handle.fd);
+ os_buffer.value = static_cast<uint64_t>(memory_handle.GetHandle());
#elif defined(OS_WIN)
os_buffer.value = reinterpret_cast<uint64_t>(memory_handle.GetHandle());
#endif
@@ -168,8 +168,8 @@ DEFINE_TEST_CLIENT_TEST_WITH_PIPE(ReadPlatformSharedBuffer, PlatformWrapperTest,
base::GetCurrentProcId());
#elif defined(OS_POSIX)
ASSERT_EQ(MOJO_PLATFORM_HANDLE_TYPE_FILE_DESCRIPTOR, os_buffer.type);
- base::SharedMemoryHandle memory_handle(static_cast<int>(os_buffer.value),
- false);
+ base::SharedMemoryHandle memory_handle(
+ base::FileDescriptor(static_cast<int>(os_buffer.value), false));
#elif defined(OS_WIN)
ASSERT_EQ(MOJO_PLATFORM_HANDLE_TYPE_WINDOWS_HANDLE, os_buffer.type);
base::SharedMemoryHandle memory_handle(

Powered by Google App Engine
This is Rietveld 408576698