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

Unified Diff: talk/app/webrtc/peerconnectionendtoend_unittest.cc

Issue 1393563002: Moving MediaStreamSignaling logic into PeerConnection. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fixing copyright header Created 5 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 | « talk/app/webrtc/peerconnection.cc ('k') | talk/app/webrtc/peerconnectionfactory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: talk/app/webrtc/peerconnectionendtoend_unittest.cc
diff --git a/talk/app/webrtc/peerconnectionendtoend_unittest.cc b/talk/app/webrtc/peerconnectionendtoend_unittest.cc
index ceabf04cf08378330cf2b481e6bfb9c5fad8a52f..eacedd4eeae0f89e8cba4d5115ab381b71fe52d3 100644
--- a/talk/app/webrtc/peerconnectionendtoend_unittest.cc
+++ b/talk/app/webrtc/peerconnectionendtoend_unittest.cc
@@ -364,3 +364,35 @@ TEST_F(PeerConnectionEndToEndTest,
EXPECT_EQ(1U, dc_1_observer->received_message_count());
EXPECT_EQ(1U, dc_2_observer->received_message_count());
}
+
+// Verifies that a DataChannel added from an OPEN message functions after
+// a channel has been previously closed (webrtc issue 3778).
+// This previously failed because the new channel re-uses the ID of the closed
+// channel, and the closed channel was incorrectly still assigned to the id.
+// TODO(deadbeef): This is disabled because there's currently a race condition
+// caused by the fact that a data channel signals that it's closed before it
+// really is. Re-enable this test once that's fixed.
+TEST_F(PeerConnectionEndToEndTest,
+ DISABLED_DataChannelFromOpenWorksAfterClose) {
+ MAYBE_SKIP_TEST(rtc::SSLStreamAdapter::HaveDtlsSrtp);
+
+ CreatePcs();
+
+ webrtc::DataChannelInit init;
+ rtc::scoped_refptr<DataChannelInterface> caller_dc(
+ caller_->CreateDataChannel("data", init));
+
+ Negotiate();
+ WaitForConnection();
+
+ WaitForDataChannelsToOpen(caller_dc, callee_signaled_data_channels_, 0);
+ CloseDataChannels(caller_dc, callee_signaled_data_channels_, 0);
+
+ // Create a new channel and ensure it works after closing the previous one.
+ caller_dc = caller_->CreateDataChannel("data2", init);
+
+ WaitForDataChannelsToOpen(caller_dc, callee_signaled_data_channels_, 1);
+ TestDataChannelSendAndReceive(caller_dc, callee_signaled_data_channels_[1]);
+
+ CloseDataChannels(caller_dc, callee_signaled_data_channels_, 1);
+}
« no previous file with comments | « talk/app/webrtc/peerconnection.cc ('k') | talk/app/webrtc/peerconnectionfactory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698