summaryrefslogtreecommitdiffstats
path: root/ppapi/tests/test_post_message.cc
diff options
context:
space:
mode:
authordmichael@chromium.org <dmichael@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-26 21:04:10 +0000
committerdmichael@chromium.org <dmichael@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-26 21:04:10 +0000
commit47ef6148e87b5410135e35afe4259344a2a458e4 (patch)
treed2361e6c4d07e361aacc0bd3dc3e1195779c9457 /ppapi/tests/test_post_message.cc
parentb6a415ea6e0ad4751d1a9dca9f99bde727033167 (diff)
downloadchromium_src-47ef6148e87b5410135e35afe4259344a2a458e4.zip
chromium_src-47ef6148e87b5410135e35afe4259344a2a458e4.tar.gz
chromium_src-47ef6148e87b5410135e35afe4259344a2a458e4.tar.bz2
Tweaks to PPB_VarArrayBuffer in preperation for taking out of Dev.
* Add Unmap. * Make ByteLength more consistent with the rest of PPAPI. * Make C++ wrapper not cache the buffer. BUG= TEST= Review URL: http://codereview.chromium.org/9169052 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@119286 0039d316-1c4b-4281-b951-d872f2087c98
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();