Make Mac pinch thresholding apply only to zoom (Chromium side)
[chromium-blink-merge.git] / ppapi / tests / test_tcp_server_socket_private.h
blob1e25381d9194f795286b234370182250c930b5f4
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_TCP_SERVER_SOCKET_PRIVATE_H_
6 #define PPAPI_TESTS_TEST_TCP_SERVER_SOCKET_PRIVATE_H_
8 #include <cstddef>
9 #include <string>
11 #include "ppapi/c/pp_stdint.h"
12 #include "ppapi/tests/test_case.h"
14 struct PP_NetAddress_Private;
16 namespace pp {
18 class TCPServerSocketPrivate;
19 class TCPSocketPrivate;
21 } // namespace pp
23 class TestTCPServerSocketPrivate : public TestCase {
24 public:
25 explicit TestTCPServerSocketPrivate(TestingInstance* instance);
27 // TestCase implementation.
28 virtual bool Init();
29 virtual void RunTests(const std::string& filter);
31 private:
32 std::string GetLocalAddress(PP_NetAddress_Private* address);
33 std::string SyncRead(pp::TCPSocketPrivate* socket,
34 char* buffer,
35 size_t num_bytes);
36 std::string SyncWrite(pp::TCPSocketPrivate* socket,
37 const char* buffer,
38 size_t num_bytes);
39 std::string SyncConnect(pp::TCPSocketPrivate* socket,
40 PP_NetAddress_Private* address);
41 void ForceConnect(pp::TCPSocketPrivate* socket,
42 PP_NetAddress_Private* address);
43 std::string SyncListen(pp::TCPServerSocketPrivate* socket,
44 PP_NetAddress_Private* address,
45 int32_t backlog);
47 std::string TestListen();
48 std::string TestBacklog();
50 std::string host_;
51 uint16_t port_;
54 #endif // PPAPI_TESTS_TEST_TCP_SERVER_SOCKET_PRIVATE_H_