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

Unified Diff: ppapi/tests/test_udp_socket_private_shared.cc

Issue 9212047: Add GetBoundAddress to PPB_UDPSocket_Private (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: add ppapi versioning to nacl, add unit test(fix existing unit tests) Created 8 years, 10 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_udp_socket_private_shared.cc
diff --git a/ppapi/tests/test_udp_socket_private_shared.cc b/ppapi/tests/test_udp_socket_private_shared.cc
index 2de64778cce0de3ddd81e4cfcbf3b4245c263aaf..8b4d9910beca724bcbac8f0b348b110d0aac94b0 100644
--- a/ppapi/tests/test_udp_socket_private_shared.cc
+++ b/ppapi/tests/test_udp_socket_private_shared.cc
@@ -75,7 +75,7 @@ std::string TestUDPSocketPrivateShared::GenerateNetAddress(
}
std::string TestUDPSocketPrivateShared::CreateAndBindUDPSocket(
- const PP_NetAddress_Private *address,
+ PP_NetAddress_Private *address,
PP_Resource *socket) {
*socket = udp_socket_private_interface_->Create(instance_->pp_instance());
if (0 == *socket)
@@ -95,6 +95,9 @@ std::string TestUDPSocketPrivateShared::CreateAndBindUDPSocket(
if (rv != PP_OK)
return ReportError("PPB_UDPSocket_Private::Bind", rv);
+ if( !udp_socket_private_interface_->GetBoundAddress(*socket, address))
yzshen1 2012/02/07 18:14:59 Space before '(' but not after: "if (!..."
mtilburg1 2012/02/07 22:08:14 Done.
+ return "PPB_UDPSocket_Private::GetBoundAddress: Failed";
+
PASS();
}
@@ -125,15 +128,15 @@ std::string TestUDPSocketPrivateShared::TestConnect() {
if (!error_message.empty())
return error_message;
error_message = GenerateNetAddress(&tcp_socket_client, &client_address);
- if (error_message.empty())
+ if (!error_message.empty())
return error_message;
PP_Resource socket_server, socket_client;
error_message = CreateAndBindUDPSocket(&server_address, &socket_server);
- if (error_message.empty())
+ if (!error_message.empty())
return error_message;
error_message = CreateAndBindUDPSocket(&client_address, &socket_client);
- if (error_message.empty())
+ if (!error_message.empty())
return error_message;
static const char* const kMessage =

Powered by Google App Engine
This is Rietveld 408576698