OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef PAPPI_TESTS_TEST_TCP_SOCKET_H_ | 5 #ifndef PAPPI_TESTS_TEST_TCP_SOCKET_H_ |
6 #define PAPPI_TESTS_TEST_TCP_SOCKET_H_ | 6 #define PAPPI_TESTS_TEST_TCP_SOCKET_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "ppapi/c/pp_stdint.h" | 10 #include "ppapi/c/pp_stdint.h" |
11 #include "ppapi/cpp/net_address.h" | 11 #include "ppapi/cpp/net_address.h" |
12 #include "ppapi/tests/test_case.h" | 12 #include "ppapi/tests/test_case.h" |
13 | 13 |
14 namespace pp { | 14 namespace pp { |
15 class TCPSocket_Dev; | 15 class TCPSocket; |
16 } | 16 } |
17 | 17 |
18 class TestTCPSocket: public TestCase { | 18 class TestTCPSocket: public TestCase { |
19 public: | 19 public: |
20 explicit TestTCPSocket(TestingInstance* instance); | 20 explicit TestTCPSocket(TestingInstance* instance); |
21 | 21 |
22 // TestCase implementation. | 22 // TestCase implementation. |
23 virtual bool Init(); | 23 virtual bool Init(); |
24 virtual void RunTests(const std::string& filter); | 24 virtual void RunTests(const std::string& filter); |
25 | 25 |
26 private: | 26 private: |
27 std::string TestConnect(); | 27 std::string TestConnect(); |
28 std::string TestReadWrite(); | 28 std::string TestReadWrite(); |
29 std::string TestSetOption(); | 29 std::string TestSetOption(); |
30 | 30 |
31 int32_t ReadFirstLineFromSocket(pp::TCPSocket_Dev* socket, std::string* s); | 31 int32_t ReadFirstLineFromSocket(pp::TCPSocket* socket, std::string* s); |
32 int32_t WriteStringToSocket(pp::TCPSocket_Dev* socket, const std::string& s); | 32 int32_t WriteStringToSocket(pp::TCPSocket* socket, const std::string& s); |
33 | 33 |
34 pp::NetAddress addr_; | 34 pp::NetAddress addr_; |
35 }; | 35 }; |
36 | 36 |
37 #endif // PAPPI_TESTS_TEST_TCP_SOCKET_H_ | 37 #endif // PAPPI_TESTS_TEST_TCP_SOCKET_H_ |
OLD | NEW |