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

Unified Diff: base/memory/shared_memory_unittest.cc

Issue 1643253003: Add member ownership_passes_to_ipc_ to SharedMemoryHandle on windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Minimal test. Created 4 years, 11 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/memory/shared_memory_handle_win.cc ('k') | base/memory/shared_memory_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/memory/shared_memory_unittest.cc
diff --git a/base/memory/shared_memory_unittest.cc b/base/memory/shared_memory_unittest.cc
index 226c5a7928156b0868037685fe36fefed5ddae59..152b69bbd84fda2ba9f83fc486a90095ff24ef4f 100644
--- a/base/memory/shared_memory_unittest.cc
+++ b/base/memory/shared_memory_unittest.cc
@@ -411,6 +411,9 @@ TEST(SharedMemoryTest, ShareToSelf) {
SharedMemoryHandle shared_handle;
ASSERT_TRUE(shmem.ShareToProcess(GetCurrentProcessHandle(), &shared_handle));
+#if defined(OS_WIN)
+ ASSERT_TRUE(shared_handle.OwnershipPassesToIPC());
+#endif
SharedMemory shared(shared_handle, /*readonly=*/false);
ASSERT_TRUE(shared.Map(contents.size()));
@@ -420,6 +423,9 @@ TEST(SharedMemoryTest, ShareToSelf) {
shared_handle = SharedMemoryHandle();
ASSERT_TRUE(shmem.ShareToProcess(GetCurrentProcessHandle(), &shared_handle));
+#if defined(OS_WIN)
+ ASSERT_TRUE(shared_handle.OwnershipPassesToIPC());
+#endif
SharedMemory readonly(shared_handle, /*readonly=*/true);
ASSERT_TRUE(readonly.Map(contents.size()));
« no previous file with comments | « base/memory/shared_memory_handle_win.cc ('k') | base/memory/shared_memory_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698