summaryrefslogtreecommitdiffstats
path: root/ppapi/tests/test_post_message.cc
diff options
context:
space:
mode:
Diffstat (limited to 'ppapi/tests/test_post_message.cc')
-rw-r--r--ppapi/tests/test_post_message.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/ppapi/tests/test_post_message.cc b/ppapi/tests/test_post_message.cc
index 6051e30..a79676b 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();