Index: content/browser/renderer_host/clipboard_message_filter_unittest.cc |
diff --git a/content/browser/renderer_host/clipboard_message_filter_unittest.cc b/content/browser/renderer_host/clipboard_message_filter_unittest.cc |
index 3e01d863c92a6743c6ef266c41421102c9c180e6..f9e06fbdd3693bf4ece6942499168cbc629667ca 100644 |
--- a/content/browser/renderer_host/clipboard_message_filter_unittest.cc |
+++ b/content/browser/renderer_host/clipboard_message_filter_unittest.cc |
@@ -52,9 +52,10 @@ class ClipboardMessageFilterTest : public ::testing::Test { |
void CallWriteImage(const gfx::Size& size, |
base::SharedMemory* shared_memory) { |
- base::SharedMemoryHandle handle; |
- ASSERT_TRUE(shared_memory->GiveReadOnlyToProcess( |
- base::GetCurrentProcessHandle(), &handle)); |
+ base::SharedMemoryHandle handle = shared_memory->GetReadOnlyHandle(); |
+ shared_memory->Unmap(); |
+ shared_memory->Close(); |
+ ASSERT_TRUE(handle.IsValid()); |
CallWriteImageDirectly(size, handle); |
} |