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

Unified Diff: webrtc/api/datachannel_unittest.cc

Issue 2564333002: Reland of: Separating SCTP code from BaseChannel/MediaChannel. (Closed)
Patch Set: Merge with master. Created 3 years, 11 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/api/datachannel.cc ('k') | webrtc/api/peerconnection.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/datachannel_unittest.cc
diff --git a/webrtc/api/datachannel_unittest.cc b/webrtc/api/datachannel_unittest.cc
index a8c8361cb1e1295d8aaa4905059d365a15dfa2e2..4ce1be573648d4e4515fa1c15e94e68ad085d3aa 100644
--- a/webrtc/api/datachannel_unittest.cc
+++ b/webrtc/api/datachannel_unittest.cc
@@ -329,7 +329,7 @@ TEST_F(SctpDataChannelTest, SendUnorderedAfterReceivesOpenAck) {
params.type = cricket::DMT_CONTROL;
rtc::CopyOnWriteBuffer payload;
webrtc::WriteDataChannelOpenAckMessage(&payload);
- dc->OnDataReceived(NULL, params, payload);
+ dc->OnDataReceived(params, payload);
// Sends another message and verifies it's unordered.
ASSERT_TRUE(dc->Send(buffer));
@@ -353,7 +353,7 @@ TEST_F(SctpDataChannelTest, SendUnorderedAfterReceiveData) {
params.ssrc = init.id;
params.type = cricket::DMT_TEXT;
webrtc::DataBuffer buffer("data");
- dc->OnDataReceived(NULL, params, buffer.data);
+ dc->OnDataReceived(params, buffer.data);
// Sends a message and verifies it's unordered.
ASSERT_TRUE(dc->Send(buffer));
@@ -414,7 +414,7 @@ TEST_F(SctpDataChannelTest, ReceiveDataWithInvalidSsrc) {
cricket::ReceiveDataParams params;
params.ssrc = 0;
webrtc::DataBuffer buffer("abcd");
- webrtc_data_channel_->OnDataReceived(NULL, params, buffer.data);
+ webrtc_data_channel_->OnDataReceived(params, buffer.data);
EXPECT_EQ(0U, observer_->messages_received());
}
@@ -430,7 +430,7 @@ TEST_F(SctpDataChannelTest, ReceiveDataWithValidSsrc) {
params.ssrc = 1;
webrtc::DataBuffer buffer("abcd");
- webrtc_data_channel_->OnDataReceived(NULL, params, buffer.data);
+ webrtc_data_channel_->OnDataReceived(params, buffer.data);
EXPECT_EQ(1U, observer_->messages_received());
}
@@ -472,9 +472,9 @@ TEST_F(SctpDataChannelTest, VerifyMessagesAndBytesReceived) {
EXPECT_EQ(0U, webrtc_data_channel_->bytes_received());
// Receive three buffers while data channel isn't open.
- webrtc_data_channel_->OnDataReceived(nullptr, params, buffers[0].data);
- webrtc_data_channel_->OnDataReceived(nullptr, params, buffers[1].data);
- webrtc_data_channel_->OnDataReceived(nullptr, params, buffers[2].data);
+ webrtc_data_channel_->OnDataReceived(params, buffers[0].data);
+ webrtc_data_channel_->OnDataReceived(params, buffers[1].data);
+ webrtc_data_channel_->OnDataReceived(params, buffers[2].data);
EXPECT_EQ(0U, observer_->messages_received());
EXPECT_EQ(0U, webrtc_data_channel_->messages_received());
EXPECT_EQ(0U, webrtc_data_channel_->bytes_received());
@@ -488,9 +488,9 @@ TEST_F(SctpDataChannelTest, VerifyMessagesAndBytesReceived) {
EXPECT_EQ(bytes_received, webrtc_data_channel_->bytes_received());
// Receive three buffers while open.
- webrtc_data_channel_->OnDataReceived(nullptr, params, buffers[3].data);
- webrtc_data_channel_->OnDataReceived(nullptr, params, buffers[4].data);
- webrtc_data_channel_->OnDataReceived(nullptr, params, buffers[5].data);
+ webrtc_data_channel_->OnDataReceived(params, buffers[3].data);
+ webrtc_data_channel_->OnDataReceived(params, buffers[4].data);
+ webrtc_data_channel_->OnDataReceived(params, buffers[5].data);
bytes_received += buffers[3].size() + buffers[4].size() + buffers[5].size();
EXPECT_EQ(6U, observer_->messages_received());
EXPECT_EQ(6U, webrtc_data_channel_->messages_received());
@@ -593,7 +593,7 @@ TEST_F(SctpDataChannelTest, ClosedWhenReceivedBufferFull) {
// Receiving data without having an observer will overflow the buffer.
for (size_t i = 0; i < 16 * 1024 + 1; ++i) {
- webrtc_data_channel_->OnDataReceived(NULL, params, buffer);
+ webrtc_data_channel_->OnDataReceived(params, buffer);
}
EXPECT_EQ(webrtc::DataChannelInterface::kClosed,
webrtc_data_channel_->state());
« no previous file with comments | « webrtc/api/datachannel.cc ('k') | webrtc/api/peerconnection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698