| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <string.h> | 5 #include <string.h> |
| 6 | 6 |
| 7 #include "ppapi/cpp/module.h" | 7 #include "ppapi/cpp/module.h" |
| 8 #include "ppapi/tests/test_udp_socket_private_shared.h" | 8 #include "ppapi/tests/test_udp_socket_private_shared.h" |
| 9 #include "ppapi/tests/test_utils.h" | 9 #include "ppapi/tests/test_utils.h" |
| 10 #include "ppapi/tests/testing_instance.h" | 10 #include "ppapi/tests/testing_instance.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 | 31 |
| 32 bool init_host_port = false; | 32 bool init_host_port = false; |
| 33 if (!GetLocalHostPort(instance_->pp_instance(), &host_, &port_)) | 33 if (!GetLocalHostPort(instance_->pp_instance(), &host_, &port_)) |
| 34 instance_->AppendError("Can't init host and port"); | 34 instance_->AppendError("Can't init host and port"); |
| 35 else | 35 else |
| 36 init_host_port = true; | 36 init_host_port = true; |
| 37 | 37 |
| 38 return tcp_socket_private_interface_ && | 38 return tcp_socket_private_interface_ && |
| 39 udp_socket_private_interface_ && | 39 udp_socket_private_interface_ && |
| 40 init_host_port && | 40 init_host_port && |
| 41 InitTestingInterface(); | 41 CheckTestingInterface(); |
| 42 } | 42 } |
| 43 | 43 |
| 44 void TestUDPSocketPrivateShared::RunTests(const std::string& filter) { | 44 void TestUDPSocketPrivateShared::RunTests(const std::string& filter) { |
| 45 RUN_TEST(Create, filter); | 45 RUN_TEST(Create, filter); |
| 46 RUN_TEST_FORCEASYNC_AND_NOT(Connect, filter); | 46 RUN_TEST_FORCEASYNC_AND_NOT(Connect, filter); |
| 47 } | 47 } |
| 48 | 48 |
| 49 void TestUDPSocketPrivateShared::QuitMessageLoop() { | 49 void TestUDPSocketPrivateShared::QuitMessageLoop() { |
| 50 testing_interface_->QuitMessageLoop(instance_->pp_instance()); | 50 testing_interface_->QuitMessageLoop(instance_->pp_instance()); |
| 51 } | 51 } |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 ASSERT_EQ(0, strncmp(kMessage, message_buffer, strlen(kMessage))); | 173 ASSERT_EQ(0, strncmp(kMessage, message_buffer, strlen(kMessage))); |
| 174 | 174 |
| 175 udp_socket_private_interface_->Close(socket_server); | 175 udp_socket_private_interface_->Close(socket_server); |
| 176 udp_socket_private_interface_->Close(socket_client); | 176 udp_socket_private_interface_->Close(socket_client); |
| 177 | 177 |
| 178 tcp_socket_private_interface_->Disconnect(tcp_socket_server); | 178 tcp_socket_private_interface_->Disconnect(tcp_socket_server); |
| 179 tcp_socket_private_interface_->Disconnect(tcp_socket_client); | 179 tcp_socket_private_interface_->Disconnect(tcp_socket_client); |
| 180 | 180 |
| 181 PASS(); | 181 PASS(); |
| 182 } | 182 } |
| OLD | NEW |