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.
5 #ifndef PPAPI_TESTS_TEST_HOST_RESOLVER_PRIVATE_H_
6 #define PPAPI_TESTS_TEST_HOST_RESOLVER_PRIVATE_H_
10 #include "ppapi/tests/test_case.h"
12 struct PP_HostResolver_Private_Hint
;
13 struct PP_NetAddress_Private
;
17 class HostResolverPrivate
;
18 class TCPSocketPrivate
;
22 class TestHostResolverPrivate
: public TestCase
{
24 explicit TestHostResolverPrivate(TestingInstance
* instance
);
26 // TestCase implementation.
28 virtual void RunTests(const std::string
& filter
);
31 std::string
SyncConnect(pp::TCPSocketPrivate
* socket
,
32 const std::string
& host
,
34 std::string
SyncConnect(pp::TCPSocketPrivate
* socket
,
35 const PP_NetAddress_Private
& address
);
36 std::string
SyncRead(pp::TCPSocketPrivate
* socket
,
40 std::string
SyncWrite(pp::TCPSocketPrivate
* socket
,
43 int32_t* bytes_written
);
44 std::string
CheckHTTPResponse(pp::TCPSocketPrivate
* socket
,
45 const std::string
& request
,
46 const std::string
& response
);
47 std::string
SyncResolve(pp::HostResolverPrivate
* host_resolver
,
48 const std::string
& host
,
50 const PP_HostResolver_Private_Hint
& hint
);
51 std::string
ParametrizedTestResolve(const PP_HostResolver_Private_Hint
& hint
);
53 std::string
TestEmpty();
54 std::string
TestResolve();
55 std::string
TestResolveIPv4();
61 #endif // PPAPI_TESTS_TEST_HOST_RESOLVER_PRIVATE_H_