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

Unified Diff: webrtc/pc/channel_unittest.cc

Issue 1970223002: Fix race in BaseChannel destructor when network thread differ from worker thread (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase Created 4 years, 7 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/pc/channel.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/pc/channel_unittest.cc
diff --git a/webrtc/pc/channel_unittest.cc b/webrtc/pc/channel_unittest.cc
index d15748ffbb878c3ace52f849862c1072d5397cfc..81339cfeda047c7999c473623d6efc91727c0e8d 100644
--- a/webrtc/pc/channel_unittest.cc
+++ b/webrtc/pc/channel_unittest.cc
@@ -1000,6 +1000,19 @@ class ChannelTest : public testing::Test, public sigslot::has_slots<> {
EXPECT_TRUE(CheckNoRtp2());
}
+ void TestDeinit() {
+ CreateChannels(RTCP, RTCP);
+ EXPECT_TRUE(SendInitiate());
+ EXPECT_TRUE(SendAccept());
+ SendRtp1();
+ SendRtp2();
+ SendRtcp1();
+ SendRtcp2();
+ // Do not wait, destroy channels.
+ channel1_.reset(nullptr);
+ channel2_.reset(nullptr);
+ }
+
// Check that RTCP is not transmitted if both sides don't support RTCP.
void SendNoRtcpToNoRtcp() {
CreateChannels(0, 0);
@@ -2076,6 +2089,10 @@ TEST_F(VoiceChannelSingleThreadTest, TestInit) {
EXPECT_TRUE(media_channel1_->dtmf_info_queue().empty());
}
+TEST_F(VoiceChannelSingleThreadTest, TestDeinit) {
+ Base::TestDeinit();
+}
+
TEST_F(VoiceChannelSingleThreadTest, TestSetContents) {
Base::TestSetContents();
}
@@ -2402,6 +2419,10 @@ TEST_F(VoiceChannelDoubleThreadTest, TestInit) {
EXPECT_TRUE(media_channel1_->dtmf_info_queue().empty());
}
+TEST_F(VoiceChannelDoubleThreadTest, TestDeinit) {
+ Base::TestDeinit();
+}
+
TEST_F(VoiceChannelDoubleThreadTest, TestSetContents) {
Base::TestSetContents();
}
@@ -2726,6 +2747,10 @@ TEST_F(VideoChannelSingleThreadTest, TestInit) {
Base::TestInit();
}
+TEST_F(VideoChannelSingleThreadTest, TestDeinit) {
+ Base::TestDeinit();
+}
+
TEST_F(VideoChannelSingleThreadTest, TestSetContents) {
Base::TestSetContents();
}
@@ -2966,6 +2991,10 @@ TEST_F(VideoChannelDoubleThreadTest, TestInit) {
Base::TestInit();
}
+TEST_F(VideoChannelDoubleThreadTest, TestDeinit) {
+ Base::TestDeinit();
+}
+
TEST_F(VideoChannelDoubleThreadTest, TestSetContents) {
Base::TestSetContents();
}
@@ -3277,6 +3306,10 @@ TEST_F(DataChannelSingleThreadTest, TestInit) {
EXPECT_FALSE(media_channel1_->IsStreamMuted(0));
}
+TEST_F(DataChannelSingleThreadTest, TestDeinit) {
+ Base::TestDeinit();
+}
+
TEST_F(DataChannelSingleThreadTest, TestSetContents) {
Base::TestSetContents();
}
@@ -3417,6 +3450,10 @@ TEST_F(DataChannelDoubleThreadTest, TestInit) {
EXPECT_FALSE(media_channel1_->IsStreamMuted(0));
}
+TEST_F(DataChannelDoubleThreadTest, TestDeinit) {
+ Base::TestDeinit();
+}
+
TEST_F(DataChannelDoubleThreadTest, TestSetContents) {
Base::TestSetContents();
}
« no previous file with comments | « webrtc/pc/channel.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698