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

Unified Diff: ppapi/tests/test_tcp_socket_private_shared.h

Issue 8555002: Added NaCl proxy for TCP/UDP (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Added PPAPI NaCl tests. Created 9 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: ppapi/tests/test_tcp_socket_private_shared.h
diff --git a/ppapi/tests/test_tcp_socket_private_shared.h b/ppapi/tests/test_tcp_socket_private_shared.h
new file mode 100644
index 0000000000000000000000000000000000000000..9c260df3abbd673935cb40495cdd934de78814ac
--- /dev/null
+++ b/ppapi/tests/test_tcp_socket_private_shared.h
@@ -0,0 +1,49 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef PPAPI_TESTS_TEST_TCP_SOCKET_PRIVATE_SHARED_H_
polina 2011/11/29 05:20:47 I am pretty sure the reviewers of the other CL wou
ygorshenin 2011/11/29 13:25:18 After moving it to the chrome CL we'll lost all hi
+#define PPAPI_TESTS_TEST_TCP_SOCKET_PRIVATE_SHARED_H_
+
+#include "ppapi/c/pp_stdint.h"
+#include "ppapi/cpp/private/tcp_socket_private.h"
+#include "ppapi/tests/test_case.h"
+
+class TestTCPSocketPrivateShared : public TestCase {
polina 2011/11/29 05:20:47 Why "Shared" at the end?
ygorshenin 2011/11/29 13:25:18 Because of there already exists class with name "T
+ public:
+ explicit TestTCPSocketPrivateShared(TestingInstance* instance)
+ : TestCase(instance) {
polina 2011/11/29 05:20:47 you should initialize member variables here (in .c
ygorshenin 2011/11/29 13:25:18 Done.
+ }
+
+ // TestCase implementation.
+ virtual bool Init();
+ virtual void RunTests(const std::string& filter);
+
+ void QuitMessageLoop();
+
+ private:
+ bool InitHostAndPort();
+
+ std::string CreateSocket(PP_Resource* socket);
+ std::string SyncConnect(PP_Resource socket, const char* host, int port);
+ std::string SyncConnectWithNetAddress(PP_Resource socket,
+ const PP_NetAddress_Private& addr);
+ std::string SyncSSLHandshake(PP_Resource socket, const char* host, int port);
+ std::string SyncRead(PP_Resource socket, char* buffer, int32_t num_bytes,
+ int32_t* bytes_read);
+ std::string SyncWrite(PP_Resource socket, const char* buffer,
+ int32_t num_bytes, int32_t* bytes_wrote);
+ std::string CheckHTTPResponse(PP_Resource socket, const char* request,
+ const char* response);
+
+ std::string TestCreate();
+ std::string TestGetAddress();
+ std::string TestConnect();
+ std::string TestReconnect();
+
+ std::string host_;
+ uint16_t port_;
+ const PPB_TCPSocket_Private* tcp_socket_private_interface_;
+};
+
+#endif // PPAPI_TESTS_TEST_TCP_SOCKET_PRIVATE_SHARED_H_

Powered by Google App Engine
This is Rietveld 408576698