| OLD | NEW |
| (Empty) |
| 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. | |
| 4 | |
| 5 #ifndef PPAPI_TESTS_TEST_TRANSPORT_H_ | |
| 6 #define PPAPI_TESTS_TEST_TRANSPORT_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 | |
| 10 #include "ppapi/c/dev/ppb_transport_dev.h" | |
| 11 #include "ppapi/tests/test_case.h" | |
| 12 | |
| 13 namespace pp { | |
| 14 class Transport_Dev; | |
| 15 } // namespace pp | |
| 16 | |
| 17 class TestTransport : public TestCase { | |
| 18 public: | |
| 19 explicit TestTransport(TestingInstance* instance) | |
| 20 : TestCase(instance), | |
| 21 transport1_(NULL), | |
| 22 transport2_(NULL) { | |
| 23 } | |
| 24 virtual ~TestTransport(); | |
| 25 | |
| 26 | |
| 27 // TestCase implementation. | |
| 28 virtual bool Init(); | |
| 29 virtual void RunTests(const std::string& filter); | |
| 30 | |
| 31 private: | |
| 32 std::string InitTargets(PP_TransportType type); | |
| 33 std::string Connect(); | |
| 34 std::string Clean(); | |
| 35 | |
| 36 std::string TestCreate(); | |
| 37 std::string TestConnect(); | |
| 38 std::string TestSetProperty(); | |
| 39 std::string TestSendDataTcp(); | |
| 40 std::string TestSendDataUdp(); | |
| 41 std::string TestConnectAndCloseTcp(); | |
| 42 std::string TestConnectAndCloseUdp(); | |
| 43 | |
| 44 // Used by the tests that access the C API directly. | |
| 45 const PPB_Transport_Dev* transport_interface_; | |
| 46 | |
| 47 pp::Transport_Dev* transport1_; | |
| 48 pp::Transport_Dev* transport2_; | |
| 49 }; | |
| 50 | |
| 51 #endif // PPAPI_TESTS_TEST_TRANSPORT_H_ | |
| OLD | NEW |