[email protected] | 6c11340 | 2012-03-23 01:31:51 | [diff] [blame] | 1 | // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
[email protected] | cfff9eb8 | 2011-11-15 03:17:10 | [diff] [blame] | 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 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] | cfff9eb8 | 2011-11-15 03:17:10 | [diff] [blame] | 13 | namespace pp { |
[email protected] | fb575bc | 2011-11-16 07:06:24 | [diff] [blame] | 14 | class TCPSocketPrivate; |
[email protected] | cfff9eb8 | 2011-11-15 03:17:10 | [diff] [blame] | 15 | } |
[email protected] | cfff9eb8 | 2011-11-15 03:17:10 | [diff] [blame] | 16 | |
17 | class TestTCPSocketPrivate : public TestCase { | ||||
18 | public: | ||||
19 | explicit TestTCPSocketPrivate(TestingInstance* instance); | ||||
20 | |||||
21 | // TestCase implementation. | ||||
22 | virtual bool Init(); | ||||
[email protected] | 2622d6b | 2011-11-16 04:28:02 | [diff] [blame] | 23 | virtual void RunTests(const std::string& filter); |
[email protected] | cfff9eb8 | 2011-11-15 03:17:10 | [diff] [blame] | 24 | |
25 | private: | ||||
26 | std::string TestBasic(); | ||||
27 | std::string TestReadWrite(); | ||||
[email protected] | 6c11340 | 2012-03-23 01:31:51 | [diff] [blame] | 28 | std::string TestReadWriteSSL(); |
[email protected] | cfff9eb8 | 2011-11-15 03:17:10 | [diff] [blame] | 29 | std::string TestConnectAddress(); |
[email protected] | 466a583 | 2013-02-22 11:17:08 | [diff] [blame] | 30 | std::string TestSetOption(); |
[email protected] | 8522332e | 2013-08-28 19:42:59 | [diff] [blame] | 31 | std::string TestLargeRead(); |
[email protected] | cfff9eb8 | 2011-11-15 03:17:10 | [diff] [blame] | 32 | |
[email protected] | fb575bc | 2011-11-16 07:06:24 | [diff] [blame] | 33 | int32_t ReadFirstLineFromSocket(pp::TCPSocketPrivate* socket, std::string* s); |
34 | int32_t WriteStringToSocket(pp::TCPSocketPrivate* socket, | ||||
35 | const std::string& s); | ||||
[email protected] | cfff9eb8 | 2011-11-15 03:17:10 | [diff] [blame] | 36 | |
37 | std::string host_; | ||||
38 | uint16_t port_; | ||||
[email protected] | 6c11340 | 2012-03-23 01:31:51 | [diff] [blame] | 39 | uint16_t ssl_port_; |
[email protected] | cfff9eb8 | 2011-11-15 03:17:10 | [diff] [blame] | 40 | }; |
41 | |||||
42 | #endif // PAPPI_TESTS_TEST_TCP_SOCKET_PRIVATE_H_ |