diff options
Diffstat (limited to 'ppapi/tests')
-rw-r--r-- | ppapi/tests/all_c_includes.h | 2 | ||||
-rw-r--r-- | ppapi/tests/all_cpp_includes.h | 2 | ||||
-rw-r--r-- | ppapi/tests/test_host_resolver.cc | 14 | ||||
-rw-r--r-- | ppapi/tests/test_host_resolver.h | 10 | ||||
-rw-r--r-- | ppapi/tests/test_tcp_socket.cc | 14 | ||||
-rw-r--r-- | ppapi/tests/test_tcp_socket.h | 6 | ||||
-rw-r--r-- | ppapi/tests/test_udp_socket.cc | 6 |
7 files changed, 27 insertions, 27 deletions
diff --git a/ppapi/tests/all_c_includes.h b/ppapi/tests/all_c_includes.h index d11a8c9..8da795e 100644 --- a/ppapi/tests/all_c_includes.h +++ b/ppapi/tests/all_c_includes.h @@ -26,7 +26,6 @@ #include "ppapi/c/dev/ppb_printing_dev.h" #include "ppapi/c/dev/ppb_resource_array_dev.h" #include "ppapi/c/dev/ppb_scrollbar_dev.h" -#include "ppapi/c/dev/ppb_tcp_socket_dev.h" #include "ppapi/c/dev/ppb_testing_dev.h" #include "ppapi/c/dev/ppb_text_input_dev.h" #include "ppapi/c/dev/ppb_trace_event_dev.h" @@ -86,6 +85,7 @@ #include "ppapi/c/ppb_mouse_lock.h" #include "ppapi/c/ppb_net_address.h" #include "ppapi/c/ppb_opengles2.h" +#include "ppapi/c/ppb_tcp_socket.h" #include "ppapi/c/ppb_url_loader.h" #include "ppapi/c/ppb_url_request_info.h" #include "ppapi/c/ppb_url_response_info.h" diff --git a/ppapi/tests/all_cpp_includes.h b/ppapi/tests/all_cpp_includes.h index 6edcc7f..c5332dc 100644 --- a/ppapi/tests/all_cpp_includes.h +++ b/ppapi/tests/all_cpp_includes.h @@ -26,7 +26,6 @@ #include "ppapi/cpp/dev/scriptable_object_deprecated.h" #include "ppapi/cpp/dev/scrollbar_dev.h" #include "ppapi/cpp/dev/selection_dev.h" -#include "ppapi/cpp/dev/tcp_socket_dev.h" #include "ppapi/cpp/dev/text_input_dev.h" #include "ppapi/cpp/dev/udp_socket_dev.h" #include "ppapi/cpp/dev/url_util_dev.h" @@ -68,6 +67,7 @@ #include "ppapi/cpp/rect.h" #include "ppapi/cpp/resource.h" #include "ppapi/cpp/size.h" +#include "ppapi/cpp/tcp_socket.h" #include "ppapi/cpp/touch_point.h" #include "ppapi/cpp/url_loader.h" #include "ppapi/cpp/url_request_info.h" diff --git a/ppapi/tests/test_host_resolver.cc b/ppapi/tests/test_host_resolver.cc index 8c97ce5..ddfb388 100644 --- a/ppapi/tests/test_host_resolver.cc +++ b/ppapi/tests/test_host_resolver.cc @@ -5,8 +5,8 @@ #include "ppapi/tests/test_host_resolver.h" #include "ppapi/cpp/dev/host_resolver_dev.h" -#include "ppapi/cpp/dev/tcp_socket_dev.h" #include "ppapi/cpp/net_address.h" +#include "ppapi/cpp/tcp_socket.h" #include "ppapi/cpp/var.h" #include "ppapi/tests/test_utils.h" #include "ppapi/tests/testing_instance.h" @@ -22,7 +22,7 @@ bool TestHostResolver::Init() { if (!host_resolver_is_available) instance_->AppendError("PPB_HostResolver interface not available"); - bool tcp_socket_is_available = pp::TCPSocket_Dev::IsAvailable(); + bool tcp_socket_is_available = pp::TCPSocket::IsAvailable(); if (!tcp_socket_is_available) instance_->AppendError("PPB_TCPSocket interface not available"); @@ -45,7 +45,7 @@ void TestHostResolver::RunTests(const std::string& filter) { } std::string TestHostResolver::SyncConnect( - pp::TCPSocket_Dev* socket, + pp::TCPSocket* socket, const pp::NetAddress& address) { TestCompletionCallback callback(instance_->pp_instance(), callback_type()); callback.WaitForResult(socket->Connect(address, callback.GetCallback())); @@ -54,7 +54,7 @@ std::string TestHostResolver::SyncConnect( PASS(); } -std::string TestHostResolver::SyncRead(pp::TCPSocket_Dev* socket, +std::string TestHostResolver::SyncRead(pp::TCPSocket* socket, char* buffer, int32_t num_bytes, int32_t* bytes_read) { @@ -67,7 +67,7 @@ std::string TestHostResolver::SyncRead(pp::TCPSocket_Dev* socket, PASS(); } -std::string TestHostResolver::SyncWrite(pp::TCPSocket_Dev* socket, +std::string TestHostResolver::SyncWrite(pp::TCPSocket* socket, const char* buffer, int32_t num_bytes, int32_t* bytes_written) { @@ -80,7 +80,7 @@ std::string TestHostResolver::SyncWrite(pp::TCPSocket_Dev* socket, PASS(); } -std::string TestHostResolver::CheckHTTPResponse(pp::TCPSocket_Dev* socket, +std::string TestHostResolver::CheckHTTPResponse(pp::TCPSocket* socket, const std::string& request, const std::string& response) { int32_t rv = 0; @@ -124,7 +124,7 @@ std::string TestHostResolver::ParameterizedTestResolve( address = host_resolver.GetNetAddress(i); ASSERT_NE(0, address.pp_resource()); - pp::TCPSocket_Dev socket(instance_); + pp::TCPSocket socket(instance_); ASSERT_SUBTEST_SUCCESS(SyncConnect(&socket, address)); ASSERT_SUBTEST_SUCCESS(CheckHTTPResponse(&socket, "GET / HTTP/1.0\r\n\r\n", diff --git a/ppapi/tests/test_host_resolver.h b/ppapi/tests/test_host_resolver.h index 4359c69..6cdeaee 100644 --- a/ppapi/tests/test_host_resolver.h +++ b/ppapi/tests/test_host_resolver.h @@ -13,7 +13,7 @@ namespace pp { class HostResolver_Dev; class NetAddress; -class TCPSocket_Dev; +class TCPSocket; } // namespace pp class TestHostResolver : public TestCase { @@ -25,17 +25,17 @@ class TestHostResolver : public TestCase { virtual void RunTests(const std::string& filter); private: - std::string SyncConnect(pp::TCPSocket_Dev* socket, + std::string SyncConnect(pp::TCPSocket* socket, const pp::NetAddress& address); - std::string SyncRead(pp::TCPSocket_Dev* socket, + std::string SyncRead(pp::TCPSocket* socket, char* buffer, int32_t num_bytes, int32_t* bytes_read); - std::string SyncWrite(pp::TCPSocket_Dev* socket, + std::string SyncWrite(pp::TCPSocket* socket, const char* buffer, int32_t num_bytes, int32_t* bytes_written); - std::string CheckHTTPResponse(pp::TCPSocket_Dev* socket, + std::string CheckHTTPResponse(pp::TCPSocket* socket, const std::string& request, const std::string& response); std::string SyncResolve(pp::HostResolver_Dev* host_resolver, diff --git a/ppapi/tests/test_tcp_socket.cc b/ppapi/tests/test_tcp_socket.cc index 699eff9..a4c56eb 100644 --- a/ppapi/tests/test_tcp_socket.cc +++ b/ppapi/tests/test_tcp_socket.cc @@ -4,7 +4,7 @@ #include "ppapi/tests/test_tcp_socket.h" -#include "ppapi/cpp/dev/tcp_socket_dev.h" +#include "ppapi/cpp/tcp_socket.h" #include "ppapi/tests/test_utils.h" #include "ppapi/tests/testing_instance.h" @@ -26,7 +26,7 @@ TestTCPSocket::TestTCPSocket(TestingInstance* instance) : TestCase(instance) { } bool TestTCPSocket::Init() { - if (!pp::TCPSocket_Dev::IsAvailable()) + if (!pp::TCPSocket::IsAvailable()) return false; // We need something to connect to, so we connect to the HTTP server whence we @@ -52,7 +52,7 @@ void TestTCPSocket::RunTests(const std::string& filter) { } std::string TestTCPSocket::TestConnect() { - pp::TCPSocket_Dev socket(instance_); + pp::TCPSocket socket(instance_); TestCompletionCallback cb(instance_->pp_instance(), callback_type()); cb.WaitForResult(socket.Connect(addr_, cb.GetCallback())); @@ -73,7 +73,7 @@ std::string TestTCPSocket::TestConnect() { } std::string TestTCPSocket::TestReadWrite() { - pp::TCPSocket_Dev socket(instance_); + pp::TCPSocket socket(instance_); TestCompletionCallback cb(instance_->pp_instance(), callback_type()); cb.WaitForResult(socket.Connect(addr_, cb.GetCallback())); @@ -91,7 +91,7 @@ std::string TestTCPSocket::TestReadWrite() { } std::string TestTCPSocket::TestSetOption() { - pp::TCPSocket_Dev socket(instance_); + pp::TCPSocket socket(instance_); TestCompletionCallback cb_1(instance_->pp_instance(), callback_type()); TestCompletionCallback cb_2(instance_->pp_instance(), callback_type()); TestCompletionCallback cb_3(instance_->pp_instance(), callback_type()); @@ -142,7 +142,7 @@ std::string TestTCPSocket::TestSetOption() { PASS(); } -int32_t TestTCPSocket::ReadFirstLineFromSocket(pp::TCPSocket_Dev* socket, +int32_t TestTCPSocket::ReadFirstLineFromSocket(pp::TCPSocket* socket, std::string* s) { char buffer[1000]; @@ -168,7 +168,7 @@ int32_t TestTCPSocket::ReadFirstLineFromSocket(pp::TCPSocket_Dev* socket, return PP_ERROR_FAILED; } -int32_t TestTCPSocket::WriteStringToSocket(pp::TCPSocket_Dev* socket, +int32_t TestTCPSocket::WriteStringToSocket(pp::TCPSocket* socket, const std::string& s) { const char* buffer = s.data(); size_t written = 0; diff --git a/ppapi/tests/test_tcp_socket.h b/ppapi/tests/test_tcp_socket.h index 3f8ba86..44c7321 100644 --- a/ppapi/tests/test_tcp_socket.h +++ b/ppapi/tests/test_tcp_socket.h @@ -12,7 +12,7 @@ #include "ppapi/tests/test_case.h" namespace pp { -class TCPSocket_Dev; +class TCPSocket; } class TestTCPSocket: public TestCase { @@ -28,8 +28,8 @@ class TestTCPSocket: public TestCase { std::string TestReadWrite(); std::string TestSetOption(); - int32_t ReadFirstLineFromSocket(pp::TCPSocket_Dev* socket, std::string* s); - int32_t WriteStringToSocket(pp::TCPSocket_Dev* socket, const std::string& s); + int32_t ReadFirstLineFromSocket(pp::TCPSocket* socket, std::string* s); + int32_t WriteStringToSocket(pp::TCPSocket* socket, const std::string& s); pp::NetAddress addr_; }; diff --git a/ppapi/tests/test_udp_socket.cc b/ppapi/tests/test_udp_socket.cc index f558443..ec5554e 100644 --- a/ppapi/tests/test_udp_socket.cc +++ b/ppapi/tests/test_udp_socket.cc @@ -6,9 +6,9 @@ #include <vector> -#include "ppapi/cpp/dev/tcp_socket_dev.h" #include "ppapi/cpp/dev/udp_socket_dev.h" #include "ppapi/cpp/pass_ref.h" +#include "ppapi/cpp/tcp_socket.h" #include "ppapi/cpp/var.h" #include "ppapi/tests/test_utils.h" #include "ppapi/tests/testing_instance.h" @@ -51,7 +51,7 @@ TestUDPSocket::TestUDPSocket(TestingInstance* instance) : TestCase(instance) { } bool TestUDPSocket::Init() { - bool tcp_socket_is_available = pp::TCPSocket_Dev::IsAvailable(); + bool tcp_socket_is_available = pp::TCPSocket::IsAvailable(); if (!tcp_socket_is_available) instance_->AppendError("PPB_TCPSocket interface not available"); @@ -86,7 +86,7 @@ void TestUDPSocket::RunTests(const std::string& filter) { } std::string TestUDPSocket::GetLocalAddress(pp::NetAddress* address) { - pp::TCPSocket_Dev socket(instance_); + pp::TCPSocket socket(instance_); TestCompletionCallback callback(instance_->pp_instance(), callback_type()); callback.WaitForResult(socket.Connect(address_, callback.GetCallback())); CHECK_CALLBACK_BEHAVIOR(callback); |