OLD | NEW |
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 Loading... |
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 Loading... |
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)); |
OLD | NEW |