OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2009 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2009 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 cricket::VoiceMediaInfo, | 77 cricket::VoiceMediaInfo, |
78 cricket::AudioOptions> {}; | 78 cricket::AudioOptions> {}; |
79 | 79 |
80 class VideoTraits : public Traits<cricket::VideoChannel, | 80 class VideoTraits : public Traits<cricket::VideoChannel, |
81 cricket::FakeVideoMediaChannel, | 81 cricket::FakeVideoMediaChannel, |
82 cricket::VideoContentDescription, | 82 cricket::VideoContentDescription, |
83 cricket::VideoCodec, | 83 cricket::VideoCodec, |
84 cricket::VideoMediaInfo, | 84 cricket::VideoMediaInfo, |
85 cricket::VideoOptions> {}; | 85 cricket::VideoOptions> {}; |
86 | 86 |
87 class DataTraits : public Traits<cricket::RtpDataChannel, | 87 class DataTraits : public Traits<cricket::DataChannel, |
88 cricket::FakeDataMediaChannel, | 88 cricket::FakeDataMediaChannel, |
89 cricket::DataContentDescription, | 89 cricket::DataContentDescription, |
90 cricket::DataCodec, | 90 cricket::DataCodec, |
91 cricket::DataMediaInfo, | 91 cricket::DataMediaInfo, |
92 cricket::DataOptions> {}; | 92 cricket::DataOptions> {}; |
93 | 93 |
94 // Base class for Voice/Video/RtpDataChannel tests | 94 // Base class for Voice/Video/DataChannel tests |
95 template<class T> | 95 template<class T> |
96 class ChannelTest : public testing::Test, public sigslot::has_slots<> { | 96 class ChannelTest : public testing::Test, public sigslot::has_slots<> { |
97 public: | 97 public: |
98 enum Flags { RTCP = 0x1, RTCP_MUX = 0x2, SECURE = 0x4, SSRC_MUX = 0x8, | 98 enum Flags { RTCP = 0x1, RTCP_MUX = 0x2, SECURE = 0x4, SSRC_MUX = 0x8, |
99 DTLS = 0x10, GCM_CIPHER = 0x20 }; | 99 DTLS = 0x10, GCM_CIPHER = 0x20 }; |
100 | 100 |
101 ChannelTest(bool verify_playout, | 101 ChannelTest(bool verify_playout, |
102 rtc::ArrayView<const uint8_t> rtp_data, | 102 rtc::ArrayView<const uint8_t> rtp_data, |
103 rtc::ArrayView<const uint8_t> rtcp_data, | 103 rtc::ArrayView<const uint8_t> rtcp_data, |
104 NetworkIsWorker network_is_worker) | 104 NetworkIsWorker network_is_worker) |
(...skipping 3176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3281 } | 3281 } |
3282 | 3282 |
3283 TEST_F(VideoChannelDoubleThreadTest, DefaultMaxBitrateIsUnlimited) { | 3283 TEST_F(VideoChannelDoubleThreadTest, DefaultMaxBitrateIsUnlimited) { |
3284 Base::DefaultMaxBitrateIsUnlimited(); | 3284 Base::DefaultMaxBitrateIsUnlimited(); |
3285 } | 3285 } |
3286 | 3286 |
3287 TEST_F(VideoChannelDoubleThreadTest, CanChangeMaxBitrate) { | 3287 TEST_F(VideoChannelDoubleThreadTest, CanChangeMaxBitrate) { |
3288 Base::CanChangeMaxBitrate(); | 3288 Base::CanChangeMaxBitrate(); |
3289 } | 3289 } |
3290 | 3290 |
3291 // RtpDataChannelSingleThreadTest | 3291 // DataChannelSingleThreadTest |
3292 class RtpDataChannelSingleThreadTest : public ChannelTest<DataTraits> { | 3292 class DataChannelSingleThreadTest : public ChannelTest<DataTraits> { |
3293 public: | 3293 public: |
3294 typedef ChannelTest<DataTraits> Base; | 3294 typedef ChannelTest<DataTraits> Base; |
3295 RtpDataChannelSingleThreadTest() | 3295 DataChannelSingleThreadTest() |
3296 : Base(true, kDataPacket, kRtcpReport, NetworkIsWorker::Yes) {} | 3296 : Base(true, kDataPacket, kRtcpReport, NetworkIsWorker::Yes) {} |
3297 }; | 3297 }; |
3298 | 3298 |
3299 // RtpDataChannelDoubleThreadTest | 3299 // DataChannelDoubleThreadTest |
3300 class RtpDataChannelDoubleThreadTest : public ChannelTest<DataTraits> { | 3300 class DataChannelDoubleThreadTest : public ChannelTest<DataTraits> { |
3301 public: | 3301 public: |
3302 typedef ChannelTest<DataTraits> Base; | 3302 typedef ChannelTest<DataTraits> Base; |
3303 RtpDataChannelDoubleThreadTest() | 3303 DataChannelDoubleThreadTest() |
3304 : Base(true, kDataPacket, kRtcpReport, NetworkIsWorker::No) {} | 3304 : Base(true, kDataPacket, kRtcpReport, NetworkIsWorker::No) {} |
3305 }; | 3305 }; |
3306 | 3306 |
3307 // Override to avoid engine channel parameter. | 3307 // Override to avoid engine channel parameter. |
3308 template <> | 3308 template <> |
3309 cricket::RtpDataChannel* ChannelTest<DataTraits>::CreateChannel( | 3309 cricket::DataChannel* ChannelTest<DataTraits>::CreateChannel( |
3310 rtc::Thread* worker_thread, | 3310 rtc::Thread* worker_thread, |
3311 rtc::Thread* network_thread, | 3311 rtc::Thread* network_thread, |
3312 cricket::MediaEngineInterface* engine, | 3312 cricket::MediaEngineInterface* engine, |
3313 cricket::FakeDataMediaChannel* ch, | 3313 cricket::FakeDataMediaChannel* ch, |
3314 cricket::TransportController* transport_controller, | 3314 cricket::TransportController* transport_controller, |
3315 int flags) { | 3315 int flags) { |
3316 cricket::RtpDataChannel* channel = new cricket::RtpDataChannel( | 3316 cricket::DataChannel* channel = new cricket::DataChannel( |
3317 worker_thread, network_thread, ch, transport_controller, cricket::CN_DATA, | 3317 worker_thread, network_thread, ch, transport_controller, cricket::CN_DATA, |
3318 (flags & RTCP) != 0, (flags & SECURE) != 0); | 3318 (flags & RTCP) != 0, (flags & SECURE) != 0); |
3319 rtc::CryptoOptions crypto_options; | 3319 rtc::CryptoOptions crypto_options; |
3320 crypto_options.enable_gcm_crypto_suites = (flags & GCM_CIPHER) != 0; | 3320 crypto_options.enable_gcm_crypto_suites = (flags & GCM_CIPHER) != 0; |
3321 channel->SetCryptoOptions(crypto_options); | 3321 channel->SetCryptoOptions(crypto_options); |
3322 if (!channel->Init_w(nullptr)) { | 3322 if (!channel->Init_w(nullptr)) { |
3323 delete channel; | 3323 delete channel; |
3324 channel = NULL; | 3324 channel = NULL; |
3325 } | 3325 } |
3326 return channel; | 3326 return channel; |
(...skipping 28 matching lines...) Expand all Loading... |
3355 } | 3355 } |
3356 | 3356 |
3357 template <> | 3357 template <> |
3358 void ChannelTest<DataTraits>::AddLegacyStreamInContent( | 3358 void ChannelTest<DataTraits>::AddLegacyStreamInContent( |
3359 uint32_t ssrc, | 3359 uint32_t ssrc, |
3360 int flags, | 3360 int flags, |
3361 cricket::DataContentDescription* data) { | 3361 cricket::DataContentDescription* data) { |
3362 data->AddLegacyStream(ssrc); | 3362 data->AddLegacyStream(ssrc); |
3363 } | 3363 } |
3364 | 3364 |
3365 TEST_F(RtpDataChannelSingleThreadTest, TestInit) { | 3365 TEST_F(DataChannelSingleThreadTest, TestInit) { |
3366 Base::TestInit(); | 3366 Base::TestInit(); |
3367 EXPECT_FALSE(media_channel1_->IsStreamMuted(0)); | 3367 EXPECT_FALSE(media_channel1_->IsStreamMuted(0)); |
3368 } | 3368 } |
3369 | 3369 |
3370 TEST_F(RtpDataChannelSingleThreadTest, TestDeinit) { | 3370 TEST_F(DataChannelSingleThreadTest, TestDeinit) { |
3371 Base::TestDeinit(); | 3371 Base::TestDeinit(); |
3372 } | 3372 } |
3373 | 3373 |
3374 TEST_F(RtpDataChannelSingleThreadTest, TestSetContents) { | 3374 TEST_F(DataChannelSingleThreadTest, TestSetContents) { |
3375 Base::TestSetContents(); | 3375 Base::TestSetContents(); |
3376 } | 3376 } |
3377 | 3377 |
3378 TEST_F(RtpDataChannelSingleThreadTest, TestSetContentsNullOffer) { | 3378 TEST_F(DataChannelSingleThreadTest, TestSetContentsNullOffer) { |
3379 Base::TestSetContentsNullOffer(); | 3379 Base::TestSetContentsNullOffer(); |
3380 } | 3380 } |
3381 | 3381 |
3382 TEST_F(RtpDataChannelSingleThreadTest, TestSetContentsRtcpMux) { | 3382 TEST_F(DataChannelSingleThreadTest, TestSetContentsRtcpMux) { |
3383 Base::TestSetContentsRtcpMux(); | 3383 Base::TestSetContentsRtcpMux(); |
3384 } | 3384 } |
3385 | 3385 |
3386 TEST_F(RtpDataChannelSingleThreadTest, TestSetRemoteContentUpdate) { | 3386 TEST_F(DataChannelSingleThreadTest, TestSetRemoteContentUpdate) { |
3387 Base::TestSetRemoteContentUpdate(); | 3387 Base::TestSetRemoteContentUpdate(); |
3388 } | 3388 } |
3389 | 3389 |
3390 TEST_F(RtpDataChannelSingleThreadTest, TestStreams) { | 3390 TEST_F(DataChannelSingleThreadTest, TestStreams) { |
3391 Base::TestStreams(); | 3391 Base::TestStreams(); |
3392 } | 3392 } |
3393 | 3393 |
3394 TEST_F(RtpDataChannelSingleThreadTest, TestUpdateStreamsInLocalContent) { | 3394 TEST_F(DataChannelSingleThreadTest, TestUpdateStreamsInLocalContent) { |
3395 Base::TestUpdateStreamsInLocalContent(); | 3395 Base::TestUpdateStreamsInLocalContent(); |
3396 } | 3396 } |
3397 | 3397 |
3398 TEST_F(RtpDataChannelSingleThreadTest, TestUpdateRemoteStreamsInContent) { | 3398 TEST_F(DataChannelSingleThreadTest, TestUpdateRemoteStreamsInContent) { |
3399 Base::TestUpdateStreamsInRemoteContent(); | 3399 Base::TestUpdateStreamsInRemoteContent(); |
3400 } | 3400 } |
3401 | 3401 |
3402 TEST_F(RtpDataChannelSingleThreadTest, TestChangeStreamParamsInContent) { | 3402 TEST_F(DataChannelSingleThreadTest, TestChangeStreamParamsInContent) { |
3403 Base::TestChangeStreamParamsInContent(); | 3403 Base::TestChangeStreamParamsInContent(); |
3404 } | 3404 } |
3405 | 3405 |
3406 TEST_F(RtpDataChannelSingleThreadTest, TestPlayoutAndSendingStates) { | 3406 TEST_F(DataChannelSingleThreadTest, TestPlayoutAndSendingStates) { |
3407 Base::TestPlayoutAndSendingStates(); | 3407 Base::TestPlayoutAndSendingStates(); |
3408 } | 3408 } |
3409 | 3409 |
3410 TEST_F(RtpDataChannelSingleThreadTest, TestMediaContentDirection) { | 3410 TEST_F(DataChannelSingleThreadTest, TestMediaContentDirection) { |
3411 Base::TestMediaContentDirection(); | 3411 Base::TestMediaContentDirection(); |
3412 } | 3412 } |
3413 | 3413 |
3414 TEST_F(RtpDataChannelSingleThreadTest, TestCallSetup) { | 3414 TEST_F(DataChannelSingleThreadTest, TestCallSetup) { |
3415 Base::TestCallSetup(); | 3415 Base::TestCallSetup(); |
3416 } | 3416 } |
3417 | 3417 |
3418 TEST_F(RtpDataChannelSingleThreadTest, TestCallTeardownRtcpMux) { | 3418 TEST_F(DataChannelSingleThreadTest, TestCallTeardownRtcpMux) { |
3419 Base::TestCallTeardownRtcpMux(); | 3419 Base::TestCallTeardownRtcpMux(); |
3420 } | 3420 } |
3421 | 3421 |
3422 TEST_F(RtpDataChannelSingleThreadTest, TestOnReadyToSend) { | 3422 TEST_F(DataChannelSingleThreadTest, TestOnReadyToSend) { |
3423 Base::TestOnReadyToSend(); | 3423 Base::TestOnReadyToSend(); |
3424 } | 3424 } |
3425 | 3425 |
3426 TEST_F(RtpDataChannelSingleThreadTest, TestOnReadyToSendWithRtcpMux) { | 3426 TEST_F(DataChannelSingleThreadTest, TestOnReadyToSendWithRtcpMux) { |
3427 Base::TestOnReadyToSendWithRtcpMux(); | 3427 Base::TestOnReadyToSendWithRtcpMux(); |
3428 } | 3428 } |
3429 | 3429 |
3430 TEST_F(RtpDataChannelSingleThreadTest, SendRtpToRtp) { | 3430 TEST_F(DataChannelSingleThreadTest, SendRtpToRtp) { |
3431 Base::SendRtpToRtp(); | 3431 Base::SendRtpToRtp(); |
3432 } | 3432 } |
3433 | 3433 |
3434 TEST_F(RtpDataChannelSingleThreadTest, SendNoRtcpToNoRtcp) { | 3434 TEST_F(DataChannelSingleThreadTest, SendNoRtcpToNoRtcp) { |
3435 Base::SendNoRtcpToNoRtcp(); | 3435 Base::SendNoRtcpToNoRtcp(); |
3436 } | 3436 } |
3437 | 3437 |
3438 TEST_F(RtpDataChannelSingleThreadTest, SendNoRtcpToRtcp) { | 3438 TEST_F(DataChannelSingleThreadTest, SendNoRtcpToRtcp) { |
3439 Base::SendNoRtcpToRtcp(); | 3439 Base::SendNoRtcpToRtcp(); |
3440 } | 3440 } |
3441 | 3441 |
3442 TEST_F(RtpDataChannelSingleThreadTest, SendRtcpToNoRtcp) { | 3442 TEST_F(DataChannelSingleThreadTest, SendRtcpToNoRtcp) { |
3443 Base::SendRtcpToNoRtcp(); | 3443 Base::SendRtcpToNoRtcp(); |
3444 } | 3444 } |
3445 | 3445 |
3446 TEST_F(RtpDataChannelSingleThreadTest, SendRtcpToRtcp) { | 3446 TEST_F(DataChannelSingleThreadTest, SendRtcpToRtcp) { |
3447 Base::SendRtcpToRtcp(); | 3447 Base::SendRtcpToRtcp(); |
3448 } | 3448 } |
3449 | 3449 |
3450 TEST_F(RtpDataChannelSingleThreadTest, SendRtcpMuxToRtcp) { | 3450 TEST_F(DataChannelSingleThreadTest, SendRtcpMuxToRtcp) { |
3451 Base::SendRtcpMuxToRtcp(); | 3451 Base::SendRtcpMuxToRtcp(); |
3452 } | 3452 } |
3453 | 3453 |
3454 TEST_F(RtpDataChannelSingleThreadTest, SendRtcpMuxToRtcpMux) { | 3454 TEST_F(DataChannelSingleThreadTest, SendRtcpMuxToRtcpMux) { |
3455 Base::SendRtcpMuxToRtcpMux(); | 3455 Base::SendRtcpMuxToRtcpMux(); |
3456 } | 3456 } |
3457 | 3457 |
3458 TEST_F(RtpDataChannelSingleThreadTest, SendEarlyRtcpMuxToRtcp) { | 3458 TEST_F(DataChannelSingleThreadTest, SendEarlyRtcpMuxToRtcp) { |
3459 Base::SendEarlyRtcpMuxToRtcp(); | 3459 Base::SendEarlyRtcpMuxToRtcp(); |
3460 } | 3460 } |
3461 | 3461 |
3462 TEST_F(RtpDataChannelSingleThreadTest, SendEarlyRtcpMuxToRtcpMux) { | 3462 TEST_F(DataChannelSingleThreadTest, SendEarlyRtcpMuxToRtcpMux) { |
3463 Base::SendEarlyRtcpMuxToRtcpMux(); | 3463 Base::SendEarlyRtcpMuxToRtcpMux(); |
3464 } | 3464 } |
3465 | 3465 |
3466 TEST_F(RtpDataChannelSingleThreadTest, SendSrtpToSrtp) { | 3466 TEST_F(DataChannelSingleThreadTest, SendSrtpToSrtp) { |
3467 Base::SendSrtpToSrtp(); | 3467 Base::SendSrtpToSrtp(); |
3468 } | 3468 } |
3469 | 3469 |
3470 TEST_F(RtpDataChannelSingleThreadTest, SendSrtpToRtp) { | 3470 TEST_F(DataChannelSingleThreadTest, SendSrtpToRtp) { |
3471 Base::SendSrtpToSrtp(); | 3471 Base::SendSrtpToSrtp(); |
3472 } | 3472 } |
3473 | 3473 |
3474 TEST_F(RtpDataChannelSingleThreadTest, SendSrtcpMux) { | 3474 TEST_F(DataChannelSingleThreadTest, SendSrtcpMux) { |
3475 Base::SendSrtpToSrtp(RTCP_MUX, RTCP_MUX); | 3475 Base::SendSrtpToSrtp(RTCP_MUX, RTCP_MUX); |
3476 } | 3476 } |
3477 | 3477 |
3478 TEST_F(RtpDataChannelSingleThreadTest, SendRtpToRtpOnThread) { | 3478 TEST_F(DataChannelSingleThreadTest, SendRtpToRtpOnThread) { |
3479 Base::SendRtpToRtpOnThread(); | 3479 Base::SendRtpToRtpOnThread(); |
3480 } | 3480 } |
3481 | 3481 |
3482 TEST_F(RtpDataChannelSingleThreadTest, SendSrtpToSrtpOnThread) { | 3482 TEST_F(DataChannelSingleThreadTest, SendSrtpToSrtpOnThread) { |
3483 Base::SendSrtpToSrtpOnThread(); | 3483 Base::SendSrtpToSrtpOnThread(); |
3484 } | 3484 } |
3485 | 3485 |
3486 TEST_F(RtpDataChannelSingleThreadTest, SendWithWritabilityLoss) { | 3486 TEST_F(DataChannelSingleThreadTest, SendWithWritabilityLoss) { |
3487 Base::SendWithWritabilityLoss(); | 3487 Base::SendWithWritabilityLoss(); |
3488 } | 3488 } |
3489 | 3489 |
3490 TEST_F(RtpDataChannelSingleThreadTest, TestMediaMonitor) { | 3490 TEST_F(DataChannelSingleThreadTest, TestMediaMonitor) { |
3491 Base::TestMediaMonitor(); | 3491 Base::TestMediaMonitor(); |
3492 } | 3492 } |
3493 | 3493 |
3494 TEST_F(RtpDataChannelSingleThreadTest, TestSendData) { | 3494 TEST_F(DataChannelSingleThreadTest, TestSendData) { |
3495 CreateChannels(0, 0); | 3495 CreateChannels(0, 0); |
3496 EXPECT_TRUE(SendInitiate()); | 3496 EXPECT_TRUE(SendInitiate()); |
3497 EXPECT_TRUE(SendAccept()); | 3497 EXPECT_TRUE(SendAccept()); |
3498 | 3498 |
3499 cricket::SendDataParams params; | 3499 cricket::SendDataParams params; |
3500 params.ssrc = 42; | 3500 params.ssrc = 42; |
3501 unsigned char data[] = {'f', 'o', 'o'}; | 3501 unsigned char data[] = {'f', 'o', 'o'}; |
3502 rtc::CopyOnWriteBuffer payload(data, 3); | 3502 rtc::CopyOnWriteBuffer payload(data, 3); |
3503 cricket::SendDataResult result; | 3503 cricket::SendDataResult result; |
3504 ASSERT_TRUE(media_channel1_->SendData(params, payload, &result)); | 3504 ASSERT_TRUE(media_channel1_->SendData(params, payload, &result)); |
3505 EXPECT_EQ(params.ssrc, media_channel1_->last_sent_data_params().ssrc); | 3505 EXPECT_EQ(params.ssrc, media_channel1_->last_sent_data_params().ssrc); |
3506 EXPECT_EQ("foo", media_channel1_->last_sent_data()); | 3506 EXPECT_EQ("foo", media_channel1_->last_sent_data()); |
3507 } | 3507 } |
3508 | 3508 |
3509 TEST_F(RtpDataChannelDoubleThreadTest, TestInit) { | 3509 TEST_F(DataChannelDoubleThreadTest, TestInit) { |
3510 Base::TestInit(); | 3510 Base::TestInit(); |
3511 EXPECT_FALSE(media_channel1_->IsStreamMuted(0)); | 3511 EXPECT_FALSE(media_channel1_->IsStreamMuted(0)); |
3512 } | 3512 } |
3513 | 3513 |
3514 TEST_F(RtpDataChannelDoubleThreadTest, TestDeinit) { | 3514 TEST_F(DataChannelDoubleThreadTest, TestDeinit) { |
3515 Base::TestDeinit(); | 3515 Base::TestDeinit(); |
3516 } | 3516 } |
3517 | 3517 |
3518 TEST_F(RtpDataChannelDoubleThreadTest, TestSetContents) { | 3518 TEST_F(DataChannelDoubleThreadTest, TestSetContents) { |
3519 Base::TestSetContents(); | 3519 Base::TestSetContents(); |
3520 } | 3520 } |
3521 | 3521 |
3522 TEST_F(RtpDataChannelDoubleThreadTest, TestSetContentsNullOffer) { | 3522 TEST_F(DataChannelDoubleThreadTest, TestSetContentsNullOffer) { |
3523 Base::TestSetContentsNullOffer(); | 3523 Base::TestSetContentsNullOffer(); |
3524 } | 3524 } |
3525 | 3525 |
3526 TEST_F(RtpDataChannelDoubleThreadTest, TestSetContentsRtcpMux) { | 3526 TEST_F(DataChannelDoubleThreadTest, TestSetContentsRtcpMux) { |
3527 Base::TestSetContentsRtcpMux(); | 3527 Base::TestSetContentsRtcpMux(); |
3528 } | 3528 } |
3529 | 3529 |
3530 TEST_F(RtpDataChannelDoubleThreadTest, TestSetRemoteContentUpdate) { | 3530 TEST_F(DataChannelDoubleThreadTest, TestSetRemoteContentUpdate) { |
3531 Base::TestSetRemoteContentUpdate(); | 3531 Base::TestSetRemoteContentUpdate(); |
3532 } | 3532 } |
3533 | 3533 |
3534 TEST_F(RtpDataChannelDoubleThreadTest, TestStreams) { | 3534 TEST_F(DataChannelDoubleThreadTest, TestStreams) { |
3535 Base::TestStreams(); | 3535 Base::TestStreams(); |
3536 } | 3536 } |
3537 | 3537 |
3538 TEST_F(RtpDataChannelDoubleThreadTest, TestUpdateStreamsInLocalContent) { | 3538 TEST_F(DataChannelDoubleThreadTest, TestUpdateStreamsInLocalContent) { |
3539 Base::TestUpdateStreamsInLocalContent(); | 3539 Base::TestUpdateStreamsInLocalContent(); |
3540 } | 3540 } |
3541 | 3541 |
3542 TEST_F(RtpDataChannelDoubleThreadTest, TestUpdateRemoteStreamsInContent) { | 3542 TEST_F(DataChannelDoubleThreadTest, TestUpdateRemoteStreamsInContent) { |
3543 Base::TestUpdateStreamsInRemoteContent(); | 3543 Base::TestUpdateStreamsInRemoteContent(); |
3544 } | 3544 } |
3545 | 3545 |
3546 TEST_F(RtpDataChannelDoubleThreadTest, TestChangeStreamParamsInContent) { | 3546 TEST_F(DataChannelDoubleThreadTest, TestChangeStreamParamsInContent) { |
3547 Base::TestChangeStreamParamsInContent(); | 3547 Base::TestChangeStreamParamsInContent(); |
3548 } | 3548 } |
3549 | 3549 |
3550 TEST_F(RtpDataChannelDoubleThreadTest, TestPlayoutAndSendingStates) { | 3550 TEST_F(DataChannelDoubleThreadTest, TestPlayoutAndSendingStates) { |
3551 Base::TestPlayoutAndSendingStates(); | 3551 Base::TestPlayoutAndSendingStates(); |
3552 } | 3552 } |
3553 | 3553 |
3554 TEST_F(RtpDataChannelDoubleThreadTest, TestMediaContentDirection) { | 3554 TEST_F(DataChannelDoubleThreadTest, TestMediaContentDirection) { |
3555 Base::TestMediaContentDirection(); | 3555 Base::TestMediaContentDirection(); |
3556 } | 3556 } |
3557 | 3557 |
3558 TEST_F(RtpDataChannelDoubleThreadTest, TestCallSetup) { | 3558 TEST_F(DataChannelDoubleThreadTest, TestCallSetup) { |
3559 Base::TestCallSetup(); | 3559 Base::TestCallSetup(); |
3560 } | 3560 } |
3561 | 3561 |
3562 TEST_F(RtpDataChannelDoubleThreadTest, TestCallTeardownRtcpMux) { | 3562 TEST_F(DataChannelDoubleThreadTest, TestCallTeardownRtcpMux) { |
3563 Base::TestCallTeardownRtcpMux(); | 3563 Base::TestCallTeardownRtcpMux(); |
3564 } | 3564 } |
3565 | 3565 |
3566 TEST_F(RtpDataChannelDoubleThreadTest, TestOnReadyToSend) { | 3566 TEST_F(DataChannelDoubleThreadTest, TestOnReadyToSend) { |
3567 Base::TestOnReadyToSend(); | 3567 Base::TestOnReadyToSend(); |
3568 } | 3568 } |
3569 | 3569 |
3570 TEST_F(RtpDataChannelDoubleThreadTest, TestOnReadyToSendWithRtcpMux) { | 3570 TEST_F(DataChannelDoubleThreadTest, TestOnReadyToSendWithRtcpMux) { |
3571 Base::TestOnReadyToSendWithRtcpMux(); | 3571 Base::TestOnReadyToSendWithRtcpMux(); |
3572 } | 3572 } |
3573 | 3573 |
3574 TEST_F(RtpDataChannelDoubleThreadTest, SendRtpToRtp) { | 3574 TEST_F(DataChannelDoubleThreadTest, SendRtpToRtp) { |
3575 Base::SendRtpToRtp(); | 3575 Base::SendRtpToRtp(); |
3576 } | 3576 } |
3577 | 3577 |
3578 TEST_F(RtpDataChannelDoubleThreadTest, SendNoRtcpToNoRtcp) { | 3578 TEST_F(DataChannelDoubleThreadTest, SendNoRtcpToNoRtcp) { |
3579 Base::SendNoRtcpToNoRtcp(); | 3579 Base::SendNoRtcpToNoRtcp(); |
3580 } | 3580 } |
3581 | 3581 |
3582 TEST_F(RtpDataChannelDoubleThreadTest, SendNoRtcpToRtcp) { | 3582 TEST_F(DataChannelDoubleThreadTest, SendNoRtcpToRtcp) { |
3583 Base::SendNoRtcpToRtcp(); | 3583 Base::SendNoRtcpToRtcp(); |
3584 } | 3584 } |
3585 | 3585 |
3586 TEST_F(RtpDataChannelDoubleThreadTest, SendRtcpToNoRtcp) { | 3586 TEST_F(DataChannelDoubleThreadTest, SendRtcpToNoRtcp) { |
3587 Base::SendRtcpToNoRtcp(); | 3587 Base::SendRtcpToNoRtcp(); |
3588 } | 3588 } |
3589 | 3589 |
3590 TEST_F(RtpDataChannelDoubleThreadTest, SendRtcpToRtcp) { | 3590 TEST_F(DataChannelDoubleThreadTest, SendRtcpToRtcp) { |
3591 Base::SendRtcpToRtcp(); | 3591 Base::SendRtcpToRtcp(); |
3592 } | 3592 } |
3593 | 3593 |
3594 TEST_F(RtpDataChannelDoubleThreadTest, SendRtcpMuxToRtcp) { | 3594 TEST_F(DataChannelDoubleThreadTest, SendRtcpMuxToRtcp) { |
3595 Base::SendRtcpMuxToRtcp(); | 3595 Base::SendRtcpMuxToRtcp(); |
3596 } | 3596 } |
3597 | 3597 |
3598 TEST_F(RtpDataChannelDoubleThreadTest, SendRtcpMuxToRtcpMux) { | 3598 TEST_F(DataChannelDoubleThreadTest, SendRtcpMuxToRtcpMux) { |
3599 Base::SendRtcpMuxToRtcpMux(); | 3599 Base::SendRtcpMuxToRtcpMux(); |
3600 } | 3600 } |
3601 | 3601 |
3602 TEST_F(RtpDataChannelDoubleThreadTest, SendEarlyRtcpMuxToRtcp) { | 3602 TEST_F(DataChannelDoubleThreadTest, SendEarlyRtcpMuxToRtcp) { |
3603 Base::SendEarlyRtcpMuxToRtcp(); | 3603 Base::SendEarlyRtcpMuxToRtcp(); |
3604 } | 3604 } |
3605 | 3605 |
3606 TEST_F(RtpDataChannelDoubleThreadTest, SendEarlyRtcpMuxToRtcpMux) { | 3606 TEST_F(DataChannelDoubleThreadTest, SendEarlyRtcpMuxToRtcpMux) { |
3607 Base::SendEarlyRtcpMuxToRtcpMux(); | 3607 Base::SendEarlyRtcpMuxToRtcpMux(); |
3608 } | 3608 } |
3609 | 3609 |
3610 TEST_F(RtpDataChannelDoubleThreadTest, SendSrtpToSrtp) { | 3610 TEST_F(DataChannelDoubleThreadTest, SendSrtpToSrtp) { |
3611 Base::SendSrtpToSrtp(); | 3611 Base::SendSrtpToSrtp(); |
3612 } | 3612 } |
3613 | 3613 |
3614 TEST_F(RtpDataChannelDoubleThreadTest, SendSrtpToRtp) { | 3614 TEST_F(DataChannelDoubleThreadTest, SendSrtpToRtp) { |
3615 Base::SendSrtpToSrtp(); | 3615 Base::SendSrtpToSrtp(); |
3616 } | 3616 } |
3617 | 3617 |
3618 TEST_F(RtpDataChannelDoubleThreadTest, SendSrtcpMux) { | 3618 TEST_F(DataChannelDoubleThreadTest, SendSrtcpMux) { |
3619 Base::SendSrtpToSrtp(RTCP_MUX, RTCP_MUX); | 3619 Base::SendSrtpToSrtp(RTCP_MUX, RTCP_MUX); |
3620 } | 3620 } |
3621 | 3621 |
3622 TEST_F(RtpDataChannelDoubleThreadTest, SendRtpToRtpOnThread) { | 3622 TEST_F(DataChannelDoubleThreadTest, SendRtpToRtpOnThread) { |
3623 Base::SendRtpToRtpOnThread(); | 3623 Base::SendRtpToRtpOnThread(); |
3624 } | 3624 } |
3625 | 3625 |
3626 TEST_F(RtpDataChannelDoubleThreadTest, SendSrtpToSrtpOnThread) { | 3626 TEST_F(DataChannelDoubleThreadTest, SendSrtpToSrtpOnThread) { |
3627 Base::SendSrtpToSrtpOnThread(); | 3627 Base::SendSrtpToSrtpOnThread(); |
3628 } | 3628 } |
3629 | 3629 |
3630 TEST_F(RtpDataChannelDoubleThreadTest, SendWithWritabilityLoss) { | 3630 TEST_F(DataChannelDoubleThreadTest, SendWithWritabilityLoss) { |
3631 Base::SendWithWritabilityLoss(); | 3631 Base::SendWithWritabilityLoss(); |
3632 } | 3632 } |
3633 | 3633 |
3634 TEST_F(RtpDataChannelDoubleThreadTest, TestMediaMonitor) { | 3634 TEST_F(DataChannelDoubleThreadTest, TestMediaMonitor) { |
3635 Base::TestMediaMonitor(); | 3635 Base::TestMediaMonitor(); |
3636 } | 3636 } |
3637 | 3637 |
3638 TEST_F(RtpDataChannelDoubleThreadTest, TestSendData) { | 3638 TEST_F(DataChannelDoubleThreadTest, TestSendData) { |
3639 CreateChannels(0, 0); | 3639 CreateChannels(0, 0); |
3640 EXPECT_TRUE(SendInitiate()); | 3640 EXPECT_TRUE(SendInitiate()); |
3641 EXPECT_TRUE(SendAccept()); | 3641 EXPECT_TRUE(SendAccept()); |
3642 | 3642 |
3643 cricket::SendDataParams params; | 3643 cricket::SendDataParams params; |
3644 params.ssrc = 42; | 3644 params.ssrc = 42; |
3645 unsigned char data[] = { | 3645 unsigned char data[] = { |
3646 'f', 'o', 'o' | 3646 'f', 'o', 'o' |
3647 }; | 3647 }; |
3648 rtc::CopyOnWriteBuffer payload(data, 3); | 3648 rtc::CopyOnWriteBuffer payload(data, 3); |
3649 cricket::SendDataResult result; | 3649 cricket::SendDataResult result; |
3650 ASSERT_TRUE(media_channel1_->SendData(params, payload, &result)); | 3650 ASSERT_TRUE(media_channel1_->SendData(params, payload, &result)); |
3651 EXPECT_EQ(params.ssrc, | 3651 EXPECT_EQ(params.ssrc, |
3652 media_channel1_->last_sent_data_params().ssrc); | 3652 media_channel1_->last_sent_data_params().ssrc); |
3653 EXPECT_EQ("foo", media_channel1_->last_sent_data()); | 3653 EXPECT_EQ("foo", media_channel1_->last_sent_data()); |
3654 } | 3654 } |
3655 | 3655 |
3656 // TODO(pthatcher): TestSetReceiver? | 3656 // TODO(pthatcher): TestSetReceiver? |
OLD | NEW |