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

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

Issue 24195004: PPB_TCPSocket: add support for TCP server socket operations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « ppapi/shared_impl/ppb_tcp_socket_shared.cc ('k') | ppapi/tests/test_tcp_socket.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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; 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 std::string TestListen();
31 std::string TestBacklog();
30 32
31 int32_t ReadFirstLineFromSocket(pp::TCPSocket* socket, std::string* s); 33 std::string ReadFirstLineFromSocket(pp::TCPSocket* socket, std::string* s);
32 int32_t WriteStringToSocket(pp::TCPSocket* socket, const std::string& s); 34 std::string ReadFromSocket(pp::TCPSocket* socket,
35 char* buffer,
36 size_t num_bytes);
37 std::string WriteToSocket(pp::TCPSocket* socket, const std::string& s);
38 std::string GetAddressToBind(pp::NetAddress* address);
39 std::string StartListen(pp::TCPSocket* socket, int32_t backlog);
33 40
34 pp::NetAddress addr_; 41 pp::NetAddress addr_;
35 }; 42 };
36 43
37 #endif // PAPPI_TESTS_TEST_TCP_SOCKET_H_ 44 #endif // PAPPI_TESTS_TEST_TCP_SOCKET_H_
OLDNEW
« no previous file with comments | « ppapi/shared_impl/ppb_tcp_socket_shared.cc ('k') | ppapi/tests/test_tcp_socket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698