Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(580)

Side by Side Diff: ppapi/tests/test_host_resolver_private.h

Issue 9455092: HostResolver is exposed to plugin. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixed PPB_HostResolver_Private: |addr| arg in GetNetAddress can't be NULL. Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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
59 #endif // PPAPI_TESTS_TEST_HOST_RESOLVER_PRIVATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698