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

Unified Diff: ppapi/tests/test_websocket.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/tests/test_post_message.cc ('k') | webkit/plugins/ppapi/host_array_buffer_var.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/tests/test_websocket.cc
diff --git a/ppapi/tests/test_websocket.cc b/ppapi/tests/test_websocket.cc
index c0073eb24949590eeb6f9e6b319ed47099e7d202..368079e6ffa84d1abc11a301de9263bcf8364e1a 100644
--- a/ppapi/tests/test_websocket.cc
+++ b/ppapi/tests/test_websocket.cc
@@ -113,7 +113,9 @@ bool TestWebSocket::AreEqualWithString(const PP_Var& var, const char* string) {
bool TestWebSocket::AreEqualWithBinary(const PP_Var& var,
const uint8_t* data,
uint32_t size) {
- if (arraybuffer_interface_->ByteLength(var) != size)
+ uint32_t buffer_size = 0;
+ PP_Bool success = arraybuffer_interface_->ByteLength(var, &buffer_size);
+ if (!success || buffer_size != size)
return false;
if (memcmp(arraybuffer_interface_->Map(var), data, size))
return false;
« no previous file with comments | « ppapi/tests/test_post_message.cc ('k') | webkit/plugins/ppapi/host_array_buffer_var.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698