skia/ext: Early out from analysis when we have more than 1 draw op.
[chromium-blink-merge.git] / ppapi / tests / test_udp_socket.h
blob7c8721ee20c81efa4f2ba0b299c4f7cb5cbc0fcc
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
3 // found in the LICENSE file.
5 #ifndef PPAPI_TESTS_TEST_UDP_SOCKET_H_
6 #define PPAPI_TESTS_TEST_UDP_SOCKET_H_
8 #include <string>
10 #include "ppapi/c/pp_stdint.h"
11 #include "ppapi/cpp/net_address.h"
12 #include "ppapi/tests/test_case.h"
14 namespace pp {
15 class UDPSocket;
18 class TestUDPSocket: public TestCase {
19 public:
20 explicit TestUDPSocket(TestingInstance* instance);
22 // TestCase implementation.
23 virtual bool Init();
24 virtual void RunTests(const std::string& filter);
26 private:
27 std::string GetLocalAddress(pp::NetAddress* address);
28 std::string SetBroadcastOptions(pp::UDPSocket* socket);
29 std::string BindUDPSocket(pp::UDPSocket* socket,
30 const pp::NetAddress& address);
31 std::string LookupPortAndBindUDPSocket(pp::UDPSocket* socket,
32 pp::NetAddress* address);
33 std::string ReadSocket(pp::UDPSocket* socket,
34 pp::NetAddress* address,
35 size_t size,
36 std::string* message);
37 std::string PassMessage(pp::UDPSocket* target,
38 pp::UDPSocket* source,
39 const pp::NetAddress& target_address,
40 const std::string& message,
41 pp::NetAddress* recvfrom_address);
43 std::string TestReadWrite();
44 std::string TestBroadcast();
45 std::string TestSetOption();
47 pp::NetAddress address_;
50 #endif // PPAPI_TESTS_TEST_UDP_SOCKET_H_