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

Unified Diff: ppapi/tests/test_udp_socket.h

Issue 16282005: Introduce PPB_UDPSocket_Dev. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ppapi/tests/all_cpp_includes.h ('k') | ppapi/tests/test_udp_socket.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/tests/test_udp_socket.h
diff --git a/ppapi/tests/test_udp_socket.h b/ppapi/tests/test_udp_socket.h
new file mode 100644
index 0000000000000000000000000000000000000000..961986aba8c21b65c65031eb840a6ea4d0ec5fcc
--- /dev/null
+++ b/ppapi/tests/test_udp_socket.h
@@ -0,0 +1,50 @@
+// Copyright (c) 2013 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_UDP_SOCKET_H_
+#define PPAPI_TESTS_TEST_UDP_SOCKET_H_
+
+#include <string>
+
+#include "ppapi/c/pp_stdint.h"
+#include "ppapi/cpp/dev/net_address_dev.h"
+#include "ppapi/tests/test_case.h"
+
+namespace pp {
+class UDPSocket_Dev;
+}
+
+class TestUDPSocket: public TestCase {
+ public:
+ explicit TestUDPSocket(TestingInstance* instance);
+
+ // TestCase implementation.
+ virtual bool Init();
+ virtual void RunTests(const std::string& filter);
+
+ private:
+ std::string GetLocalAddress(pp::NetAddress_Dev* address);
+ std::string SetBroadcastOptions(pp::UDPSocket_Dev* socket);
+ std::string BindUDPSocket(pp::UDPSocket_Dev* socket,
+ const pp::NetAddress_Dev& address);
+ std::string LookupPortAndBindUDPSocket(pp::UDPSocket_Dev* socket,
+ pp::NetAddress_Dev* address);
+ std::string ReadSocket(pp::UDPSocket_Dev* socket,
+ pp::NetAddress_Dev* address,
+ size_t size,
+ std::string* message);
+ std::string PassMessage(pp::UDPSocket_Dev* target,
+ pp::UDPSocket_Dev* source,
+ const pp::NetAddress_Dev& target_address,
+ const std::string& message,
+ pp::NetAddress_Dev* recvfrom_address);
+
+ std::string TestReadWrite();
+ std::string TestBroadcast();
+ std::string TestSetOption();
+
+ pp::NetAddress_Dev address_;
+};
+
+#endif // PPAPI_TESTS_TEST_UDP_SOCKET_H_
« no previous file with comments | « ppapi/tests/all_cpp_includes.h ('k') | ppapi/tests/test_udp_socket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698