summaryrefslogtreecommitdiffstats
path: root/ppapi/tests/test_websocket.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_websocket.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_websocket.cc')
-rw-r--r--ppapi/tests/test_websocket.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/ppapi/tests/test_websocket.cc b/ppapi/tests/test_websocket.cc
index c0073eb..368079e 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;