Upstream version 7.35.139.0
[platform/framework/web/crosswalk.git] / src / base / memory / shared_memory_unittest.cc
index f2a9e74..4d49c36 100644 (file)
@@ -373,7 +373,11 @@ TEST(SharedMemoryTest, ShareReadOnly) {
   StringPiece contents = "Hello World";
 
   SharedMemory writable_shmem;
-  ASSERT_TRUE(writable_shmem.CreateAndMapAnonymous(contents.size()));
+  SharedMemoryCreateOptions options;
+  options.size = contents.size();
+  options.share_read_only = true;
+  ASSERT_TRUE(writable_shmem.Create(options));
+  ASSERT_TRUE(writable_shmem.Map(options.size));
   memcpy(writable_shmem.memory(), contents.data(), contents.size());
   EXPECT_TRUE(writable_shmem.Unmap());