| Index: ppapi/tests/test_transport.cc
|
| ===================================================================
|
| --- ppapi/tests/test_transport.cc (revision 75009)
|
| +++ ppapi/tests/test_transport.cc (working copy)
|
| @@ -1,4 +1,4 @@
|
| -// Copyright (c) 2011 The Chromium Authors. All rights reserved.
|
| +// Copyright (c) 2010 The Chromium Authors. All rights reserved.
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| @@ -9,11 +9,11 @@
|
| #include <string>
|
|
|
| #include "ppapi/c/dev/ppb_testing_dev.h"
|
| +#include "ppapi/c/dev/ppb_transport_dev.h"
|
| #include "ppapi/c/pp_errors.h"
|
| #include "ppapi/cpp/completion_callback.h"
|
| #include "ppapi/cpp/instance.h"
|
| #include "ppapi/cpp/module.h"
|
| -#include "ppapi/cpp/dev/transport_dev.h"
|
| #include "ppapi/tests/test_utils.h"
|
| #include "ppapi/tests/testing_instance.h"
|
|
|
| @@ -26,42 +26,11 @@
|
| }
|
|
|
| void TestTransport::RunTest() {
|
| - RUN_TEST(Basics);
|
| + RUN_TEST(FirstTransport);
|
| // TODO(juberti): more Transport tests here...
|
| }
|
|
|
| -std::string TestTransport::TestBasics() {
|
| - pp::Transport_Dev transport1(instance_, "test", "");
|
| - pp::Transport_Dev transport2(instance_, "test", "");
|
| -
|
| - TestCompletionCallback connect_cb1;
|
| - TestCompletionCallback connect_cb2;
|
| - ASSERT_EQ(transport1.Connect(connect_cb1), PP_ERROR_WOULDBLOCK);
|
| - ASSERT_EQ(transport2.Connect(connect_cb2), PP_ERROR_WOULDBLOCK);
|
| -
|
| - pp::Var address1;
|
| - pp::Var address2;
|
| - TestCompletionCallback next_address_cb1;
|
| - TestCompletionCallback next_address_cb2;
|
| - ASSERT_EQ(transport1.GetNextAddress(&address1, next_address_cb1),
|
| - PP_ERROR_WOULDBLOCK);
|
| - ASSERT_EQ(transport2.GetNextAddress(&address2, next_address_cb2),
|
| - PP_ERROR_WOULDBLOCK);
|
| - ASSERT_EQ(next_address_cb1.WaitForResult(), 0);
|
| - ASSERT_EQ(next_address_cb2.WaitForResult(), 0);
|
| - ASSERT_EQ(transport1.GetNextAddress(&address1, next_address_cb1), PP_OK);
|
| - ASSERT_EQ(transport2.GetNextAddress(&address2, next_address_cb2), PP_OK);
|
| -
|
| - ASSERT_EQ(transport1.ReceiveRemoteAddress(address2), 0);
|
| - ASSERT_EQ(transport2.ReceiveRemoteAddress(address1), 0);
|
| -
|
| - ASSERT_EQ(connect_cb1.WaitForResult(), 0);
|
| - ASSERT_EQ(connect_cb2.WaitForResult(), 0);
|
| -
|
| - ASSERT_TRUE(transport1.IsWritable());
|
| - ASSERT_TRUE(transport2.IsWritable());
|
| -
|
| - // TODO(sergeyu): Verify that data can be sent/received.
|
| -
|
| +std::string TestTransport::TestFirstTransport() {
|
| + // TODO(juberti): actual test
|
| PASS();
|
| }
|
|
|