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
3 // found in the LICENSE file.
5 #ifndef PPAPI_TESTS_TEST_UDP_SOCKET_PRIVATE_H_
6 #define PPAPI_TESTS_TEST_UDP_SOCKET_PRIVATE_H_
10 #include "ppapi/c/pp_stdint.h"
11 #include "ppapi/cpp/private/udp_socket_private.h"
12 #include "ppapi/tests/test_case.h"
14 class TestUDPSocketPrivate
: public TestCase
{
16 explicit TestUDPSocketPrivate(TestingInstance
* instance
);
18 // TestCase implementation.
20 virtual void RunTests(const std::string
& filter
);
23 std::string
GetLocalAddress(PP_NetAddress_Private
* address
);
24 std::string
SetBroadcastOptions(pp::UDPSocketPrivate
* socket
);
25 std::string
BindUDPSocket(pp::UDPSocketPrivate
* socket
,
26 PP_NetAddress_Private
*address
);
27 std::string
LookupPortAndBindUDPSocket(pp::UDPSocketPrivate
* socket
,
28 PP_NetAddress_Private
* address
);
29 std::string
BindUDPSocketFailure(pp::UDPSocketPrivate
* socket
,
30 PP_NetAddress_Private
*address
);
31 std::string
ReadSocket(pp::UDPSocketPrivate
* socket
,
32 PP_NetAddress_Private
* address
,
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
);
40 std::string
TestConnect();
41 std::string
TestConnectFailure();
42 std::string
TestBroadcast();
43 std::string
TestSetSocketFeatureErrors();
49 #endif // PPAPI_TESTS_TEST_UDP_SOCKET_PRIVATE_H_