| 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 "ppapi/tests/test_tcp_socket_private_shared.h" | 5 #include "ppapi/tests/test_tcp_socket_private_shared.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "ppapi/cpp/module.h" | 9 #include "ppapi/cpp/module.h" |
| 10 #include "ppapi/tests/test_utils.h" | 10 #include "ppapi/tests/test_utils.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 instance_->AppendError("TCPSocketPrivate interface not available"); | 24 instance_->AppendError("TCPSocketPrivate interface not available"); |
| 25 | 25 |
| 26 bool init_host_port = false; | 26 bool init_host_port = false; |
| 27 if (!GetLocalHostPort(instance_->pp_instance(), &host_, &port_)) | 27 if (!GetLocalHostPort(instance_->pp_instance(), &host_, &port_)) |
| 28 instance_->AppendError("Can't init host and port"); | 28 instance_->AppendError("Can't init host and port"); |
| 29 else | 29 else |
| 30 init_host_port = true; | 30 init_host_port = true; |
| 31 | 31 |
| 32 return tcp_socket_private_interface_ && | 32 return tcp_socket_private_interface_ && |
| 33 init_host_port && | 33 init_host_port && |
| 34 InitTestingInterface(); | 34 CheckTestingInterface(); |
| 35 } | 35 } |
| 36 | 36 |
| 37 void TestTCPSocketPrivateShared::RunTests(const std::string& filter) { | 37 void TestTCPSocketPrivateShared::RunTests(const std::string& filter) { |
| 38 RUN_TEST(Create, filter); | 38 RUN_TEST(Create, filter); |
| 39 RUN_TEST_FORCEASYNC_AND_NOT(GetAddress, filter); | 39 RUN_TEST_FORCEASYNC_AND_NOT(GetAddress, filter); |
| 40 RUN_TEST_FORCEASYNC_AND_NOT(Connect, filter); | 40 RUN_TEST_FORCEASYNC_AND_NOT(Connect, filter); |
| 41 RUN_TEST_FORCEASYNC_AND_NOT(Reconnect, filter); | 41 RUN_TEST_FORCEASYNC_AND_NOT(Reconnect, filter); |
| 42 } | 42 } |
| 43 | 43 |
| 44 void TestTCPSocketPrivateShared::QuitMessageLoop() { | 44 void TestTCPSocketPrivateShared::QuitMessageLoop() { |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 "GET / HTTP/1.0\r\n\r\n", | 238 "GET / HTTP/1.0\r\n\r\n", |
| 239 "HTTP/1.0 200 OK"); | 239 "HTTP/1.0 200 OK"); |
| 240 if (!error_message.empty()) | 240 if (!error_message.empty()) |
| 241 return error_message; | 241 return error_message; |
| 242 tcp_socket_private_interface_->Disconnect(socket); | 242 tcp_socket_private_interface_->Disconnect(socket); |
| 243 | 243 |
| 244 PASS(); | 244 PASS(); |
| 245 } | 245 } |
| 246 | 246 |
| 247 // TODO(ygorshenin): test SSLHandshake somehow | 247 // TODO(ygorshenin): test SSLHandshake somehow |
| OLD | NEW |