Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(854)

Unified Diff: ppapi/tests/test_post_message.cc

Issue 9169052: Tweaks to PPB_VarArrayBuffer in preperation for taking out of Dev. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes based on reviews Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ppapi/shared_impl/var.h ('k') | ppapi/tests/test_websocket.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « ppapi/shared_impl/var.h ('k') | ppapi/tests/test_websocket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698