Index: ppapi/tests/test_udp_socket.cc |
diff --git a/ppapi/tests/test_udp_socket.cc b/ppapi/tests/test_udp_socket.cc |
index e0b76f47728b3ae9100378f9f5fe42b57ebdeb30..8972e4e94385efc53fc5e3112dca417ddc4e7623 100644 |
--- a/ppapi/tests/test_udp_socket.cc |
+++ b/ppapi/tests/test_udp_socket.cc |
@@ -272,36 +272,35 @@ std::string TestUDPSocket::TestSetOption() { |
CHECK_CALLBACK_BEHAVIOR(callback); |
ASSERT_EQ(PP_OK, callback.result()); |
- // SEND_BUFFER_SIZE and RECV_BUFFER_SIZE shouldn't be set before the socket is |
- // bound. |
callback.WaitForResult(socket.SetOption( |
PP_UDPSOCKET_OPTION_SEND_BUFFER_SIZE, pp::Var(4096), |
callback.GetCallback())); |
CHECK_CALLBACK_BEHAVIOR(callback); |
- ASSERT_EQ(PP_ERROR_FAILED, callback.result()); |
+ ASSERT_EQ(PP_OK, callback.result()); |
callback.WaitForResult(socket.SetOption( |
PP_UDPSOCKET_OPTION_RECV_BUFFER_SIZE, pp::Var(512), |
callback.GetCallback())); |
CHECK_CALLBACK_BEHAVIOR(callback); |
- ASSERT_EQ(PP_ERROR_FAILED, callback.result()); |
+ ASSERT_EQ(PP_OK, callback.result()); |
pp::NetAddress address; |
ASSERT_SUBTEST_SUCCESS(LookupPortAndBindUDPSocket(&socket, &address)); |
- // ADDRESS_REUSE and BROADCAST won't take effect after the socket is bound. |
+ // ADDRESS_REUSE won't take effect after the socket is bound. |
callback.WaitForResult(socket.SetOption( |
PP_UDPSOCKET_OPTION_ADDRESS_REUSE, pp::Var(true), |
callback.GetCallback())); |
CHECK_CALLBACK_BEHAVIOR(callback); |
ASSERT_EQ(PP_ERROR_FAILED, callback.result()); |
+ // BROADCAST, SEND_BUFFER_SIZE and RECV_BUFFER_SIZE can be set after the |
+ // socket is bound. |
callback.WaitForResult(socket.SetOption( |
PP_UDPSOCKET_OPTION_BROADCAST, pp::Var(true), callback.GetCallback())); |
CHECK_CALLBACK_BEHAVIOR(callback); |
- ASSERT_EQ(PP_ERROR_FAILED, callback.result()); |
+ ASSERT_EQ(PP_OK, callback.result()); |
- // SEND_BUFFER_SIZE and RECV_BUFFER_SIZE can be set after the socket is bound. |
callback.WaitForResult(socket.SetOption( |
PP_UDPSOCKET_OPTION_SEND_BUFFER_SIZE, pp::Var(2048), |
callback.GetCallback())); |