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

Side by Side Diff: webrtc/api/webrtcsession_unittest.cc

Issue 2397413002: - Filter data channel codecs based on codec name instead of payload type, which may have been remap… (Closed)
Patch Set: reviewer comments 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 unified diff | Download patch
« no previous file with comments | « webrtc/api/webrtcsdp_unittest.cc ('k') | webrtc/media/base/mediaconstants.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 3949 matching lines...) Expand 10 before | Expand all | Expand 10 after
3960 3960
3961 // TEST PLAN: Set the port number to something new, set it in the SDP, 3961 // TEST PLAN: Set the port number to something new, set it in the SDP,
3962 // and pass it all the way down. 3962 // and pass it all the way down.
3963 EXPECT_EQ(cricket::DCT_SCTP, data_engine_->last_channel_type()); 3963 EXPECT_EQ(cricket::DCT_SCTP, data_engine_->last_channel_type());
3964 CreateDataChannel(); 3964 CreateDataChannel();
3965 3965
3966 cricket::FakeDataMediaChannel* ch = data_engine_->GetChannel(0); 3966 cricket::FakeDataMediaChannel* ch = data_engine_->GetChannel(0);
3967 int portnum = -1; 3967 int portnum = -1;
3968 ASSERT_TRUE(ch != NULL); 3968 ASSERT_TRUE(ch != NULL);
3969 ASSERT_EQ(1UL, ch->send_codecs().size()); 3969 ASSERT_EQ(1UL, ch->send_codecs().size());
3970 EXPECT_EQ(cricket::kGoogleSctpDataCodecId, ch->send_codecs()[0].id); 3970 EXPECT_EQ(cricket::kGoogleSctpDataCodecPlType, ch->send_codecs()[0].id);
3971 EXPECT_EQ(0, strcmp(cricket::kGoogleSctpDataCodecName, 3971 EXPECT_EQ(0, strcmp(cricket::kGoogleSctpDataCodecName,
3972 ch->send_codecs()[0].name.c_str())); 3972 ch->send_codecs()[0].name.c_str()));
3973 EXPECT_TRUE(ch->send_codecs()[0].GetParam(cricket::kCodecParamPort, 3973 EXPECT_TRUE(ch->send_codecs()[0].GetParam(cricket::kCodecParamPort,
3974 &portnum)); 3974 &portnum));
3975 EXPECT_EQ(new_send_port, portnum); 3975 EXPECT_EQ(new_send_port, portnum);
3976 3976
3977 ASSERT_EQ(1UL, ch->recv_codecs().size()); 3977 ASSERT_EQ(1UL, ch->recv_codecs().size());
3978 EXPECT_EQ(cricket::kGoogleSctpDataCodecId, ch->recv_codecs()[0].id); 3978 EXPECT_EQ(cricket::kGoogleSctpDataCodecPlType, ch->recv_codecs()[0].id);
3979 EXPECT_EQ(0, strcmp(cricket::kGoogleSctpDataCodecName, 3979 EXPECT_EQ(0, strcmp(cricket::kGoogleSctpDataCodecName,
3980 ch->recv_codecs()[0].name.c_str())); 3980 ch->recv_codecs()[0].name.c_str()));
3981 EXPECT_TRUE(ch->recv_codecs()[0].GetParam(cricket::kCodecParamPort, 3981 EXPECT_TRUE(ch->recv_codecs()[0].GetParam(cricket::kCodecParamPort,
3982 &portnum)); 3982 &portnum));
3983 EXPECT_EQ(new_recv_port, portnum); 3983 EXPECT_EQ(new_recv_port, portnum);
3984 } 3984 }
3985 3985
3986 // Verifies that when a session's DataChannel receives an OPEN message, 3986 // Verifies that when a session's DataChannel receives an OPEN message,
3987 // WebRtcSession signals the DataChannel creation request with the expected 3987 // WebRtcSession signals the DataChannel creation request with the expected
3988 // config. 3988 // config.
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
4348 } 4348 }
4349 4349
4350 // TODO(bemasc): Add a TestIceStatesBundle with BUNDLE enabled. That test 4350 // TODO(bemasc): Add a TestIceStatesBundle with BUNDLE enabled. That test
4351 // currently fails because upon disconnection and reconnection OnIceComplete is 4351 // currently fails because upon disconnection and reconnection OnIceComplete is
4352 // called more than once without returning to IceGatheringGathering. 4352 // called more than once without returning to IceGatheringGathering.
4353 4353
4354 INSTANTIATE_TEST_CASE_P(WebRtcSessionTests, 4354 INSTANTIATE_TEST_CASE_P(WebRtcSessionTests,
4355 WebRtcSessionTest, 4355 WebRtcSessionTest,
4356 testing::Values(ALREADY_GENERATED, 4356 testing::Values(ALREADY_GENERATED,
4357 DTLS_IDENTITY_STORE)); 4357 DTLS_IDENTITY_STORE));
OLDNEW
« no previous file with comments | « webrtc/api/webrtcsdp_unittest.cc ('k') | webrtc/media/base/mediaconstants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698