| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 #include "jingle/glue/pseudotcp_adapter.h" | 5 #include "jingle/glue/pseudotcp_adapter.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 | 293 |
| 294 scoped_refptr<net::DrainableIOBuffer> output_buffer_; | 294 scoped_refptr<net::DrainableIOBuffer> output_buffer_; |
| 295 scoped_refptr<net::GrowableIOBuffer> input_buffer_; | 295 scoped_refptr<net::GrowableIOBuffer> input_buffer_; |
| 296 | 296 |
| 297 int write_errors_; | 297 int write_errors_; |
| 298 int read_errors_; | 298 int read_errors_; |
| 299 }; | 299 }; |
| 300 | 300 |
| 301 class PseudoTcpAdapterTest : public testing::Test { | 301 class PseudoTcpAdapterTest : public testing::Test { |
| 302 protected: | 302 protected: |
| 303 virtual void SetUp() override { | 303 void SetUp() override { |
| 304 JingleThreadWrapper::EnsureForCurrentMessageLoop(); | 304 JingleThreadWrapper::EnsureForCurrentMessageLoop(); |
| 305 | 305 |
| 306 host_socket_ = new FakeSocket(); | 306 host_socket_ = new FakeSocket(); |
| 307 client_socket_ = new FakeSocket(); | 307 client_socket_ = new FakeSocket(); |
| 308 | 308 |
| 309 host_socket_->Connect(client_socket_); | 309 host_socket_->Connect(client_socket_); |
| 310 client_socket_->Connect(host_socket_); | 310 client_socket_->Connect(host_socket_); |
| 311 | 311 |
| 312 host_pseudotcp_.reset(new PseudoTcpAdapter(host_socket_)); | 312 host_pseudotcp_.reset(new PseudoTcpAdapter(host_socket_)); |
| 313 client_pseudotcp_.reset(new PseudoTcpAdapter(client_socket_)); | 313 client_pseudotcp_.reset(new PseudoTcpAdapter(client_socket_)); |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 435 client_pseudotcp_.get()); | 435 client_pseudotcp_.get()); |
| 436 | 436 |
| 437 tester->Start(); | 437 tester->Start(); |
| 438 message_loop_.Run(); | 438 message_loop_.Run(); |
| 439 tester->CheckResults(); | 439 tester->CheckResults(); |
| 440 } | 440 } |
| 441 | 441 |
| 442 } // namespace | 442 } // namespace |
| 443 | 443 |
| 444 } // namespace jingle_glue | 444 } // namespace jingle_glue |
| OLD | NEW |