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

Unified Diff: ppapi/tests/test_tcp_socket.cc

Issue 690903002: Remove timing limitation of SetOption invocation for PPAPI sockets. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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/proxy/udp_socket_resource_base.cc ('k') | ppapi/tests/test_udp_socket.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/tests/test_tcp_socket.cc
diff --git a/ppapi/tests/test_tcp_socket.cc b/ppapi/tests/test_tcp_socket.cc
index 604487c5b9516ce6fe01ac2b7c8c17fd0cc29782..a3164deb6b6c2b2a42f9337ea0278f71eb7b1222 100644
--- a/ppapi/tests/test_tcp_socket.cc
+++ b/ppapi/tests/test_tcp_socket.cc
@@ -140,7 +140,7 @@ std::string TestTCPSocket::TestSetOption() {
TestCompletionCallback cb_2(instance_->pp_instance(), callback_type());
TestCompletionCallback cb_3(instance_->pp_instance(), callback_type());
- // These options cannot be set before the socket is connected.
+ // These options can be set even before the socket is connected.
int32_t result_1 = socket.SetOption(PP_TCPSOCKET_OPTION_NO_DELAY,
true, cb_1.GetCallback());
int32_t result_2 = socket.SetOption(PP_TCPSOCKET_OPTION_SEND_BUFFER_SIZE,
@@ -150,15 +150,15 @@ std::string TestTCPSocket::TestSetOption() {
cb_1.WaitForResult(result_1);
CHECK_CALLBACK_BEHAVIOR(cb_1);
- ASSERT_EQ(PP_ERROR_FAILED, cb_1.result());
+ ASSERT_EQ(PP_OK, cb_1.result());
cb_2.WaitForResult(result_2);
CHECK_CALLBACK_BEHAVIOR(cb_2);
- ASSERT_EQ(PP_ERROR_FAILED, cb_2.result());
+ ASSERT_EQ(PP_OK, cb_2.result());
cb_3.WaitForResult(result_3);
CHECK_CALLBACK_BEHAVIOR(cb_3);
- ASSERT_EQ(PP_ERROR_FAILED, cb_3.result());
+ ASSERT_EQ(PP_OK, cb_3.result());
cb_1.WaitForResult(socket.Connect(addr_, cb_1.GetCallback()));
CHECK_CALLBACK_BEHAVIOR(cb_1);
@@ -458,4 +458,3 @@ std::string TestTCPSocket::StartListen(pp::TCPSocket* socket, int32_t backlog) {
PASS();
}
-
« no previous file with comments | « ppapi/proxy/udp_socket_resource_base.cc ('k') | ppapi/tests/test_udp_socket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698