summaryrefslogtreecommitdiffstats
path: root/ppapi/tests
diff options
context:
space:
mode:
authortoyoshim@chromium.org <toyoshim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-19 06:22:51 +0000
committertoyoshim@chromium.org <toyoshim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-19 06:22:51 +0000
commit8778b63e6ab02be9c2feef92a13fdca3f2ae4f28 (patch)
treeae9746f8f453754bc870bd39d8a1d139d0848989 /ppapi/tests
parenta189a701d7fefe3c26b76efa529dc3e956e28c30 (diff)
downloadchromium_src-8778b63e6ab02be9c2feef92a13fdca3f2ae4f28.zip
chromium_src-8778b63e6ab02be9c2feef92a13fdca3f2ae4f28.tar.gz
chromium_src-8778b63e6ab02be9c2feef92a13fdca3f2ae4f28.tar.bz2
WebSocket Pepper API: WebArrayBuffer support
- support SetBinaryType() - support WebArrayBuffer and stop supporting WebData - use Var instead of PP_Var to hold received messages - Add C++ interfaces to handle binary types BUG=87310 TEST=ui_test --gtest_filter='PPAPITest.WebSocket_*' Review URL: http://codereview.chromium.org/9026007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118258 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/tests')
-rw-r--r--ppapi/tests/test_websocket.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/ppapi/tests/test_websocket.cc b/ppapi/tests/test_websocket.cc
index da09d82..34b56b0 100644
--- a/ppapi/tests/test_websocket.cc
+++ b/ppapi/tests/test_websocket.cc
@@ -197,6 +197,10 @@ std::string TestWebSocket::TestUninitializedPropertiesAccess() {
ASSERT_TRUE(AreEqualWithString(url, ""));
ReleaseVar(url);
+ PP_WebSocketBinaryType_Dev binary_type =
+ websocket_interface_->GetBinaryType(ws);
+ ASSERT_EQ(PP_WEBSOCKETBINARYTYPE_BLOB_DEV, binary_type);
+
core_interface_->ReleaseResource(ws);
PASS();
@@ -564,6 +568,7 @@ std::string TestWebSocket::TestCcInterfaces() {
ASSERT_TRUE(AreEqualWithString(ws.GetURL().pp_var(), ""));
// Check communication interfaces (connect, send, receive, and close).
+ ws.SetBinaryType(PP_WEBSOCKETBINARYTYPE_ARRAYBUFFER_DEV);
TestCompletionCallback connect_callback(instance_->pp_instance());
int32_t result = ws.Connect(pp::Var(std::string(kCloseServerURL)), NULL, 0U,
connect_callback);
@@ -617,6 +622,7 @@ std::string TestWebSocket::TestCcInterfaces() {
ASSERT_TRUE(AreEqualWithString(ws.GetProtocol().pp_var(), ""));
ASSERT_EQ(PP_WEBSOCKETREADYSTATE_CLOSED_DEV, ws.GetReadyState());
ASSERT_TRUE(AreEqualWithString(ws.GetURL().pp_var(), kCloseServerURL));
+ ASSERT_EQ(PP_WEBSOCKETBINARYTYPE_ARRAYBUFFER_DEV, ws.GetBinaryType());
PASS();
}