1 // Copyright 2013 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_H_
6 #define PPAPI_TESTS_TEST_HOST_RESOLVER_H_
10 #include "ppapi/c/ppb_host_resolver.h"
11 #include "ppapi/tests/test_case.h"
19 class TestHostResolver
: public TestCase
{
21 explicit TestHostResolver(TestingInstance
* instance
);
23 // TestCase implementation.
25 virtual void RunTests(const std::string
& filter
);
28 std::string
SyncConnect(pp::TCPSocket
* socket
,
29 const pp::NetAddress
& address
);
30 std::string
SyncRead(pp::TCPSocket
* socket
,
34 std::string
SyncWrite(pp::TCPSocket
* socket
,
37 int32_t* bytes_written
);
38 std::string
CheckHTTPResponse(pp::TCPSocket
* socket
,
39 const std::string
& request
,
40 const std::string
& response
);
41 std::string
SyncResolve(pp::HostResolver
* host_resolver
,
42 const std::string
& host
,
44 const PP_HostResolver_Hint
& hint
);
45 std::string
ParameterizedTestResolve(const PP_HostResolver_Hint
& hint
);
47 std::string
TestEmpty();
48 std::string
TestResolve();
49 std::string
TestResolveIPv4();
55 #endif // PPAPI_TESTS_TEST_HOST_RESOLVER_H_