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