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

Unified Diff: webrtc/p2p/base/transportcontroller_unittest.cc

Issue 2396513003: Restore thread name consistency for webrtc/p2p/ . (Closed)
Patch Set: Explicit call rtc::Thread::CreateWithSocketServer() for unit test. Created 4 years, 2 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/p2p/base/transport.h ('k') | webrtc/p2p/client/socketmonitor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/base/transportcontroller_unittest.cc
diff --git a/webrtc/p2p/base/transportcontroller_unittest.cc b/webrtc/p2p/base/transportcontroller_unittest.cc
index f44f831b0e4fcf6b4ca79c20744e593975f5666b..d1f3816af9245821c3ba272eb474e475298afc27 100644
--- a/webrtc/p2p/base/transportcontroller_unittest.cc
+++ b/webrtc/p2p/base/transportcontroller_unittest.cc
@@ -50,13 +50,13 @@ class TransportControllerTest : public testing::Test,
ConnectTransportControllerSignals();
}
- void CreateTransportControllerWithWorkerThread() {
- if (!worker_thread_) {
- worker_thread_.reset(new rtc::Thread());
- worker_thread_->Start();
+ void CreateTransportControllerWithNetworkThread() {
+ if (!network_thread_) {
+ network_thread_ = rtc::Thread::CreateWithSocketServer();
+ network_thread_->Start();
}
transport_controller_.reset(
- new TransportControllerForTest(worker_thread_.get()));
+ new TransportControllerForTest(network_thread_.get()));
ConnectTransportControllerSignals();
}
@@ -92,8 +92,8 @@ class TransportControllerTest : public testing::Test,
}
// Used for thread hopping test.
- void CreateChannelsAndCompleteConnectionOnWorkerThread() {
- worker_thread_->Invoke<void>(
+ void CreateChannelsAndCompleteConnectionOnNetworkThread() {
+ network_thread_->Invoke<void>(
RTC_FROM_HERE,
rtc::Bind(
&TransportControllerTest::CreateChannelsAndCompleteConnection_w,
@@ -174,7 +174,7 @@ class TransportControllerTest : public testing::Test,
++candidates_signal_count_;
}
- std::unique_ptr<rtc::Thread> worker_thread_; // Not used for most tests.
+ std::unique_ptr<rtc::Thread> network_thread_; // Not used for most tests.
std::unique_ptr<TransportControllerForTest> transport_controller_;
// Information received from signals from transport controller.
@@ -662,8 +662,8 @@ TEST_F(TransportControllerTest, TestSignalCandidatesGathered) {
}
TEST_F(TransportControllerTest, TestSignalingOccursOnSignalingThread) {
- CreateTransportControllerWithWorkerThread();
- CreateChannelsAndCompleteConnectionOnWorkerThread();
+ CreateTransportControllerWithNetworkThread();
+ CreateChannelsAndCompleteConnectionOnNetworkThread();
// connecting --> connected --> completed
EXPECT_EQ_WAIT(kIceConnectionCompleted, connection_state_, kTimeout);
« no previous file with comments | « webrtc/p2p/base/transport.h ('k') | webrtc/p2p/client/socketmonitor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698