blob: 4396cfcf1e191453c28d37e857298deec4f8ab02 [file] [log] [blame]
[email protected]6c113402012-03-23 01:31:511// Copyright (c) 2012 The Chromium Authors. All rights reserved.
[email protected]cfff9eb82011-11-15 03:17:102// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef PAPPI_TESTS_TEST_TCP_SOCKET_PRIVATE_H_
6#define PAPPI_TESTS_TEST_TCP_SOCKET_PRIVATE_H_
7
8#include <string>
9
10#include "ppapi/c/pp_stdint.h"
11#include "ppapi/tests/test_case.h"
12
[email protected]cfff9eb82011-11-15 03:17:1013namespace pp {
[email protected]fb575bc2011-11-16 07:06:2414class TCPSocketPrivate;
[email protected]cfff9eb82011-11-15 03:17:1015}
[email protected]cfff9eb82011-11-15 03:17:1016
17class TestTCPSocketPrivate : public TestCase {
18 public:
19 explicit TestTCPSocketPrivate(TestingInstance* instance);
20
21 // TestCase implementation.
22 virtual bool Init();
[email protected]2622d6b2011-11-16 04:28:0223 virtual void RunTests(const std::string& filter);
[email protected]cfff9eb82011-11-15 03:17:1024
25 private:
26 std::string TestBasic();
27 std::string TestReadWrite();
[email protected]6c113402012-03-23 01:31:5128 std::string TestReadWriteSSL();
[email protected]cfff9eb82011-11-15 03:17:1029 std::string TestConnectAddress();
[email protected]466a5832013-02-22 11:17:0830 std::string TestSetOption();
[email protected]8522332e2013-08-28 19:42:5931 std::string TestLargeRead();
[email protected]cfff9eb82011-11-15 03:17:1032
[email protected]fb575bc2011-11-16 07:06:2433 int32_t ReadFirstLineFromSocket(pp::TCPSocketPrivate* socket, std::string* s);
34 int32_t WriteStringToSocket(pp::TCPSocketPrivate* socket,
35 const std::string& s);
[email protected]cfff9eb82011-11-15 03:17:1036
37 std::string host_;
38 uint16_t port_;
[email protected]6c113402012-03-23 01:31:5139 uint16_t ssl_port_;
[email protected]cfff9eb82011-11-15 03:17:1040};
41
42#endif // PAPPI_TESTS_TEST_TCP_SOCKET_PRIVATE_H_