OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef PPAPI_TESTS_TEST_HOST_RESOLVER_PRIVATE_H_ |
| 6 #define PPAPI_TESTS_TEST_HOST_RESOLVER_PRIVATE_H_ |
| 7 |
| 8 #include <string> |
| 9 |
| 10 #include "ppapi/c/ppb_core.h" |
| 11 #include "ppapi/c/private/ppb_host_resolver_private.h" |
| 12 #include "ppapi/tests/test_case.h" |
| 13 |
| 14 namespace pp { |
| 15 |
| 16 class TCPSocketPrivate; |
| 17 |
| 18 } // namespace pp |
| 19 |
| 20 class TestHostResolverPrivate : public TestCase { |
| 21 public: |
| 22 explicit TestHostResolverPrivate(TestingInstance* instance); |
| 23 |
| 24 // TestCase implementation. |
| 25 virtual bool Init(); |
| 26 virtual void RunTests(const std::string& filter); |
| 27 |
| 28 private: |
| 29 std::string SyncConnect(pp::TCPSocketPrivate* socket, |
| 30 const std::string& host, |
| 31 uint16_t port); |
| 32 std::string SyncConnect(pp::TCPSocketPrivate* socket, |
| 33 const PP_NetAddress_Private& address); |
| 34 std::string SyncRead(pp::TCPSocketPrivate* socket, |
| 35 char* buffer, |
| 36 int32_t num_bytes, |
| 37 int32_t* bytes_read); |
| 38 std::string SyncWrite(pp::TCPSocketPrivate* socket, |
| 39 const char* buffer, |
| 40 int32_t num_bytes, |
| 41 int32_t* bytes_written); |
| 42 std::string CheckHTTPResponse(pp::TCPSocketPrivate* socket, |
| 43 const std::string& request, |
| 44 const std::string& response); |
| 45 std::string SyncResolve(PP_Resource host_resolver, |
| 46 const std::string& host, |
| 47 uint16_t port, |
| 48 const PP_HostResolver_Private_Hint& hint); |
| 49 std::string ParametrizedTestResolve(const PP_HostResolver_Private_Hint& hint); |
| 50 |
| 51 std::string TestCreate(); |
| 52 std::string TestResolve(); |
| 53 std::string TestResolveIPv4(); |
| 54 |
| 55 const PPB_Core* core_interface_; |
| 56 const PPB_HostResolver_Private* host_resolver_private_interface_; |
| 57 |
| 58 std::string host_; |
| 59 uint16_t port_; |
| 60 }; |
| 61 |
| 62 #endif // PPAPI_TESTS_TEST_HOST_RESOLVER_PRIVATE_H_ |
OLD | NEW |