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

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: Change default PT for google-data 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
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 3947 matching lines...) Expand 10 before | Expand all | Expand 10 after
3958 3958
3959 // TEST PLAN: Set the port number to something new, set it in the SDP, 3959 // TEST PLAN: Set the port number to something new, set it in the SDP,
3960 // and pass it all the way down. 3960 // and pass it all the way down.
3961 EXPECT_EQ(cricket::DCT_SCTP, data_engine_->last_channel_type()); 3961 EXPECT_EQ(cricket::DCT_SCTP, data_engine_->last_channel_type());
3962 CreateDataChannel(); 3962 CreateDataChannel();
3963 3963
3964 cricket::FakeDataMediaChannel* ch = data_engine_->GetChannel(0); 3964 cricket::FakeDataMediaChannel* ch = data_engine_->GetChannel(0);
3965 int portnum = -1; 3965 int portnum = -1;
3966 ASSERT_TRUE(ch != NULL); 3966 ASSERT_TRUE(ch != NULL);
3967 ASSERT_EQ(1UL, ch->send_codecs().size()); 3967 ASSERT_EQ(1UL, ch->send_codecs().size());
3968 EXPECT_EQ(cricket::kGoogleSctpDataCodecId, ch->send_codecs()[0].id); 3968 EXPECT_EQ(cricket::kGoogleSctpDataCodecPlType, ch->send_codecs()[0].id);
3969 EXPECT_EQ(0, strcmp(cricket::kGoogleSctpDataCodecName, 3969 EXPECT_EQ(0, strcmp(cricket::kGoogleSctpDataCodecName,
3970 ch->send_codecs()[0].name.c_str())); 3970 ch->send_codecs()[0].name.c_str()));
3971 EXPECT_TRUE(ch->send_codecs()[0].GetParam(cricket::kCodecParamPort, 3971 EXPECT_TRUE(ch->send_codecs()[0].GetParam(cricket::kCodecParamPort,
3972 &portnum)); 3972 &portnum));
3973 EXPECT_EQ(new_send_port, portnum); 3973 EXPECT_EQ(new_send_port, portnum);
3974 3974
3975 ASSERT_EQ(1UL, ch->recv_codecs().size()); 3975 ASSERT_EQ(1UL, ch->recv_codecs().size());
3976 EXPECT_EQ(cricket::kGoogleSctpDataCodecId, ch->recv_codecs()[0].id); 3976 EXPECT_EQ(cricket::kGoogleSctpDataCodecPlType, ch->recv_codecs()[0].id);
3977 EXPECT_EQ(0, strcmp(cricket::kGoogleSctpDataCodecName, 3977 EXPECT_EQ(0, strcmp(cricket::kGoogleSctpDataCodecName,
3978 ch->recv_codecs()[0].name.c_str())); 3978 ch->recv_codecs()[0].name.c_str()));
3979 EXPECT_TRUE(ch->recv_codecs()[0].GetParam(cricket::kCodecParamPort, 3979 EXPECT_TRUE(ch->recv_codecs()[0].GetParam(cricket::kCodecParamPort,
3980 &portnum)); 3980 &portnum));
3981 EXPECT_EQ(new_recv_port, portnum); 3981 EXPECT_EQ(new_recv_port, portnum);
3982 } 3982 }
3983 3983
3984 // Verifies that when a session's DataChannel receives an OPEN message, 3984 // Verifies that when a session's DataChannel receives an OPEN message,
3985 // WebRtcSession signals the DataChannel creation request with the expected 3985 // WebRtcSession signals the DataChannel creation request with the expected
3986 // config. 3986 // config.
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
4346 } 4346 }
4347 4347
4348 // TODO(bemasc): Add a TestIceStatesBundle with BUNDLE enabled. That test 4348 // TODO(bemasc): Add a TestIceStatesBundle with BUNDLE enabled. That test
4349 // currently fails because upon disconnection and reconnection OnIceComplete is 4349 // currently fails because upon disconnection and reconnection OnIceComplete is
4350 // called more than once without returning to IceGatheringGathering. 4350 // called more than once without returning to IceGatheringGathering.
4351 4351
4352 INSTANTIATE_TEST_CASE_P(WebRtcSessionTests, 4352 INSTANTIATE_TEST_CASE_P(WebRtcSessionTests,
4353 WebRtcSessionTest, 4353 WebRtcSessionTest,
4354 testing::Values(ALREADY_GENERATED, 4354 testing::Values(ALREADY_GENERATED,
4355 DTLS_IDENTITY_STORE)); 4355 DTLS_IDENTITY_STORE));
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698