Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(79)

Side by Side Diff: jingle/glue/pseudotcp_adapter_unittest.cc

Issue 10823224: Update JingleThreadWrapper to allow it to be created using task runner. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/renderer/p2p/p2p_transport_impl.cc ('k') | jingle/glue/thread_wrapper.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 scoped_refptr<net::DrainableIOBuffer> output_buffer_; 296 scoped_refptr<net::DrainableIOBuffer> output_buffer_;
297 scoped_refptr<net::GrowableIOBuffer> input_buffer_; 297 scoped_refptr<net::GrowableIOBuffer> input_buffer_;
298 298
299 int write_errors_; 299 int write_errors_;
300 int read_errors_; 300 int read_errors_;
301 }; 301 };
302 302
303 class PseudoTcpAdapterTest : public testing::Test { 303 class PseudoTcpAdapterTest : public testing::Test {
304 protected: 304 protected:
305 virtual void SetUp() OVERRIDE { 305 virtual void SetUp() OVERRIDE {
306 JingleThreadWrapper::EnsureForCurrentThread(); 306 JingleThreadWrapper::EnsureForCurrentMessageLoop();
307 307
308 host_socket_ = new FakeSocket(); 308 host_socket_ = new FakeSocket();
309 client_socket_ = new FakeSocket(); 309 client_socket_ = new FakeSocket();
310 310
311 host_socket_->Connect(client_socket_); 311 host_socket_->Connect(client_socket_);
312 client_socket_->Connect(host_socket_); 312 client_socket_->Connect(host_socket_);
313 313
314 host_pseudotcp_.reset(new PseudoTcpAdapter(host_socket_)); 314 host_pseudotcp_.reset(new PseudoTcpAdapter(host_socket_));
315 client_pseudotcp_.reset(new PseudoTcpAdapter(client_socket_)); 315 client_pseudotcp_.reset(new PseudoTcpAdapter(client_socket_));
316 } 316 }
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 client_pseudotcp_.get()); 437 client_pseudotcp_.get());
438 438
439 tester->Start(); 439 tester->Start();
440 message_loop_.Run(); 440 message_loop_.Run();
441 tester->CheckResults(); 441 tester->CheckResults();
442 } 442 }
443 443
444 } // namespace 444 } // namespace
445 445
446 } // namespace jingle_glue 446 } // namespace jingle_glue
OLDNEW
« no previous file with comments | « content/renderer/p2p/p2p_transport_impl.cc ('k') | jingle/glue/thread_wrapper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698