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

Unified Diff: webrtc/api/test/peerconnectiontestwrapper.cc

Issue 1860423002: Changed PeerConnectionEndToEndTest to use a separate worker thread. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/api/test/peerconnectiontestwrapper.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/test/peerconnectiontestwrapper.cc
diff --git a/webrtc/api/test/peerconnectiontestwrapper.cc b/webrtc/api/test/peerconnectiontestwrapper.cc
index 2ff9b5d0092c24ac84629438111a0c996da70f01..038980ce5681369d50789ee5de9d89742ef7e8e9 100644
--- a/webrtc/api/test/peerconnectiontestwrapper.cc
+++ b/webrtc/api/test/peerconnectiontestwrapper.cc
@@ -47,15 +47,16 @@ void PeerConnectionTestWrapper::Connect(PeerConnectionTestWrapper* caller,
caller, &PeerConnectionTestWrapper::ReceiveAnswerSdp);
}
-PeerConnectionTestWrapper::PeerConnectionTestWrapper(const std::string& name)
- : name_(name) {}
+PeerConnectionTestWrapper::PeerConnectionTestWrapper(const std::string& name,
+ rtc::Thread* worker_thread)
+ : name_(name), worker_thread_(worker_thread) {}
PeerConnectionTestWrapper::~PeerConnectionTestWrapper() {}
bool PeerConnectionTestWrapper::CreatePc(
const MediaConstraintsInterface* constraints) {
rtc::scoped_ptr<cricket::PortAllocator> port_allocator(
- new cricket::FakePortAllocator(rtc::Thread::Current(), nullptr));
+ new cricket::FakePortAllocator(worker_thread_, nullptr));
fake_audio_capture_module_ = FakeAudioCaptureModule::Create();
if (fake_audio_capture_module_ == NULL) {
@@ -63,8 +64,8 @@ bool PeerConnectionTestWrapper::CreatePc(
}
peer_connection_factory_ = webrtc::CreatePeerConnectionFactory(
- rtc::Thread::Current(), rtc::Thread::Current(),
- fake_audio_capture_module_, NULL, NULL);
+ worker_thread_, rtc::Thread::Current(), fake_audio_capture_module_, NULL,
+ NULL);
if (!peer_connection_factory_) {
return false;
}
« no previous file with comments | « webrtc/api/test/peerconnectiontestwrapper.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698