Index: ppapi/tests/test_post_message.cc |
diff --git a/ppapi/tests/test_post_message.cc b/ppapi/tests/test_post_message.cc |
index 6051e30c58768ff49944b9256b997c6df4199d63..a79676bb03146b16f26dd458ba1f2083bd81b880 100644 |
--- a/ppapi/tests/test_post_message.cc |
+++ b/ppapi/tests/test_post_message.cc |
@@ -263,6 +263,11 @@ std::string TestPostMessage::TestSendingArrayBuffer() { |
pp::VarArrayBuffer_Dev test_data(sizes[i]); |
if (sizes[i] > 0) |
ASSERT_NE(NULL, test_data.Map()); |
+ // Make sure we can Unmap/Map successfully (there's not really any way to |
+ // detect if it's unmapped, so we just re-map before getting the pointer to |
+ // the buffer). |
+ test_data.Unmap(); |
+ test_data.Map(); |
ASSERT_EQ(sizes[i], test_data.ByteLength()); |
unsigned char* buff = static_cast<unsigned char*>(test_data.Map()); |
const uint32_t kByteLength = test_data.ByteLength(); |