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

Unified Diff: webrtc/api/peerconnectionendtoend_unittest.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 | « no previous file | webrtc/api/test/peerconnectiontestwrapper.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/peerconnectionendtoend_unittest.cc
diff --git a/webrtc/api/peerconnectionendtoend_unittest.cc b/webrtc/api/peerconnectionendtoend_unittest.cc
index be662886d3fdef96a70c1d560fa2a5dfaa5087a5..20df17bc63e439924002ab9f0dbb912256c3b77a 100644
--- a/webrtc/api/peerconnectionendtoend_unittest.cc
+++ b/webrtc/api/peerconnectionendtoend_unittest.cc
@@ -17,6 +17,7 @@
#include "webrtc/base/gunit.h"
#include "webrtc/base/logging.h"
#include "webrtc/base/ssladapter.h"
+#include "webrtc/base/thread.h"
#include "webrtc/base/sslstreamadapter.h"
#include "webrtc/base/stringencode.h"
#include "webrtc/base/stringutils.h"
@@ -46,11 +47,12 @@ class PeerConnectionEndToEndTest
typedef std::vector<rtc::scoped_refptr<DataChannelInterface> >
DataChannelList;
- PeerConnectionEndToEndTest()
- : caller_(new rtc::RefCountedObject<PeerConnectionTestWrapper>(
- "caller")),
- callee_(new rtc::RefCountedObject<PeerConnectionTestWrapper>(
- "callee")) {
+ PeerConnectionEndToEndTest() {
+ RTC_CHECK(worker_thread_.Start());
+ caller_ = new rtc::RefCountedObject<PeerConnectionTestWrapper>(
+ "caller", &worker_thread_);
+ callee_ = new rtc::RefCountedObject<PeerConnectionTestWrapper>(
+ "callee", &worker_thread_);
#ifdef WEBRTC_ANDROID
webrtc::InitializeAndroidObjects();
#endif
@@ -151,6 +153,7 @@ class PeerConnectionEndToEndTest
}
protected:
+ rtc::Thread worker_thread_;
rtc::scoped_refptr<PeerConnectionTestWrapper> caller_;
rtc::scoped_refptr<PeerConnectionTestWrapper> callee_;
DataChannelList caller_signaled_data_channels_;
« no previous file with comments | « no previous file | webrtc/api/test/peerconnectiontestwrapper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698