commit | 9b5467e88d6f1b3cadb2f9d04941a2b4dec77188 | [log] [tgz] |
---|---|---|
author | bemasc@webrtc.org <bemasc@webrtc.org> | Thu Dec 04 23:16:52 2014 |
committer | bemasc@webrtc.org <bemasc@webrtc.org> | Thu Dec 04 23:16:52 2014 |
tree | 25b2765f74fe842ce46304794e701c061ef95bf1 | |
parent | 4b407aa985e5804a250975d7448aa9fd72b69c29 [diff] [blame] |
Fix assertion failure when closing data channel, and add a unit test. BUG=4066 R=jiayl@webrtc.org, juberti@webrtc.org Review URL: https://webrtc-codereview.appspot.com/31109004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@7816 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/talk/app/webrtc/datachannel_unittest.cc b/talk/app/webrtc/datachannel_unittest.cc index 84a6935..82f5dc9 100644 --- a/talk/app/webrtc/datachannel_unittest.cc +++ b/talk/app/webrtc/datachannel_unittest.cc
@@ -423,3 +423,10 @@ EXPECT_EQ(webrtc::DataChannelInterface::kOpen, webrtc_data_channel_->state()); } + +// Tests that a channel can be closed without being opened or assigned an sid. +TEST_F(SctpDataChannelTest, NeverOpened) { + provider_.set_transport_available(true); + webrtc_data_channel_->OnTransportChannelCreated(); + webrtc_data_channel_->Close(); +}