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

Unified Diff: ppapi/tests/test_websocket.cc

Issue 10332138: WebSocket Pepper API: allow to close connection without code and reason (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: reuse 1005 Created 8 years, 7 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
Index: ppapi/tests/test_websocket.cc
diff --git a/ppapi/tests/test_websocket.cc b/ppapi/tests/test_websocket.cc
index 30926551b0c8992183ad1dca85c81681e74b3ab9..d3b189a64b7df871f9fe28db962f0b9190f66405 100644
--- a/ppapi/tests/test_websocket.cc
+++ b/ppapi/tests/test_websocket.cc
@@ -553,6 +553,16 @@ std::string TestWebSocket::TestValidClose() {
ASSERT_EQ(PP_OK, callback.result());
core_interface_->ReleaseResource(ws);
+ // Close without code and reason.
+ ws = Connect(GetFullURL(kEchoServerURL), &result, "");
+ ASSERT_TRUE(ws);
+ ASSERT_EQ(PP_OK, result);
+ callback.WaitForResult(websocket_interface_->Close(
+ ws, PP_WEBSOCKETSTATUSCODE_NOT_SPECIFIED, reason,
+ callback.GetCallback().pp_completion_callback()));
+ ASSERT_EQ(PP_OK, callback.result());
+ core_interface_->ReleaseResource(ws);
+
// Close with PP_VARTYPE_UNDEFINED.
ws = Connect(GetFullURL(kEchoServerURL), &result, "");
ASSERT_TRUE(ws);

Powered by Google App Engine
This is Rietveld 408576698