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

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

Issue 10735056: AllowBroadcast() is exposed to NaCl. (Closed) Base URL: http://git.chromium.org/chromium/src.git@udp_broadcast
Patch Set: Sync. Created 8 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 PPAPI_TESTS_TEST_UDP_SOCKET_PRIVATE_H_ 5 #ifndef PPAPI_TESTS_TEST_UDP_SOCKET_PRIVATE_H_
6 #define PPAPI_TESTS_TEST_UDP_SOCKET_PRIVATE_H_ 6 #define PPAPI_TESTS_TEST_UDP_SOCKET_PRIVATE_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/private/udp_socket_private.h" 11 #include "ppapi/cpp/private/udp_socket_private.h"
12 #include "ppapi/tests/test_case.h" 12 #include "ppapi/tests/test_case.h"
13 13
14 class TestUDPSocketPrivate : public TestCase { 14 class TestUDPSocketPrivate : public TestCase {
15 public: 15 public:
16 explicit TestUDPSocketPrivate(TestingInstance* instance); 16 explicit TestUDPSocketPrivate(TestingInstance* instance);
17 17
18 // TestCase implementation. 18 // TestCase implementation.
19 virtual bool Init(); 19 virtual bool Init();
20 virtual void RunTests(const std::string& filter); 20 virtual void RunTests(const std::string& filter);
21 21
22 private: 22 private:
23 std::string GetLocalAddress(PP_NetAddress_Private* address); 23 std::string GetLocalAddress(PP_NetAddress_Private* address);
24 std::string SetBroadcastOptions(pp::UDPSocketPrivate* socket);
24 std::string BindUDPSocket(pp::UDPSocketPrivate* socket, 25 std::string BindUDPSocket(pp::UDPSocketPrivate* socket,
25 PP_NetAddress_Private *address); 26 PP_NetAddress_Private *address);
27 std::string LookupPortAndBindUDPSocket(pp::UDPSocketPrivate* socket,
28 PP_NetAddress_Private* address);
26 std::string BindUDPSocketFailure(pp::UDPSocketPrivate* socket, 29 std::string BindUDPSocketFailure(pp::UDPSocketPrivate* socket,
27 PP_NetAddress_Private *address); 30 PP_NetAddress_Private *address);
31 std::string ReadSocket(pp::UDPSocketPrivate* socket,
32 PP_NetAddress_Private* address,
33 size_t size,
34 std::string* message);
35 std::string PassMessage(pp::UDPSocketPrivate* target,
36 pp::UDPSocketPrivate* source,
37 PP_NetAddress_Private* address,
38 const std::string& message);
28 39
29 std::string TestConnect(); 40 std::string TestConnect();
30 std::string TestConnectFailure(); 41 std::string TestConnectFailure();
42 std::string TestBroadcast();
43 std::string TestSetSocketFeatureErrors();
31 44
32 std::string host_; 45 std::string host_;
33 uint16_t port_; 46 uint16_t port_;
34 }; 47 };
35 48
36 #endif // PPAPI_TESTS_TEST_UDP_SOCKET_PRIVATE_H_ 49 #endif // PPAPI_TESTS_TEST_UDP_SOCKET_PRIVATE_H_
OLDNEW
« no previous file with comments | « ppapi/shared_impl/private/udp_socket_private_impl.cc ('k') | ppapi/tests/test_udp_socket_private.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698