| OLD | NEW |
| 1 /* | 1 /* |
| 2 * libjingle | 2 * libjingle |
| 3 * Copyright 2009 Google Inc. | 3 * Copyright 2009 Google Inc. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
| 9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 */ | 26 */ |
| 27 | 27 |
| 28 #include "talk/media/base/fakemediaengine.h" | 28 #include "talk/media/base/fakemediaengine.h" |
| 29 #include "talk/media/base/fakertp.h" | 29 #include "talk/media/base/fakertp.h" |
| 30 #include "talk/media/base/fakescreencapturerfactory.h" | 30 #include "talk/media/base/fakescreencapturerfactory.h" |
| 31 #include "talk/media/base/fakevideocapturer.h" | 31 #include "talk/media/base/fakevideocapturer.h" |
| 32 #include "talk/media/base/mediachannel.h" | 32 #include "talk/media/base/mediachannel.h" |
| 33 #include "talk/media/base/rtpdump.h" | 33 #include "talk/media/base/rtpdump.h" |
| 34 #include "talk/media/base/screencastid.h" | 34 #include "talk/media/base/screencastid.h" |
| 35 #include "talk/media/base/testutils.h" | 35 #include "talk/media/base/testutils.h" |
| 36 #include "talk/session/media/channel.h" |
| 36 #include "webrtc/p2p/base/faketransportcontroller.h" | 37 #include "webrtc/p2p/base/faketransportcontroller.h" |
| 37 #include "talk/session/media/channel.h" | 38 #include "webrtc/base/arraysize.h" |
| 38 #include "webrtc/base/fileutils.h" | 39 #include "webrtc/base/fileutils.h" |
| 39 #include "webrtc/base/gunit.h" | 40 #include "webrtc/base/gunit.h" |
| 40 #include "webrtc/base/helpers.h" | 41 #include "webrtc/base/helpers.h" |
| 41 #include "webrtc/base/logging.h" | 42 #include "webrtc/base/logging.h" |
| 42 #include "webrtc/base/pathutils.h" | 43 #include "webrtc/base/pathutils.h" |
| 43 #include "webrtc/base/signalthread.h" | 44 #include "webrtc/base/signalthread.h" |
| 44 #include "webrtc/base/ssladapter.h" | 45 #include "webrtc/base/ssladapter.h" |
| 45 #include "webrtc/base/sslidentity.h" | 46 #include "webrtc/base/sslidentity.h" |
| 46 #include "webrtc/base/window.h" | 47 #include "webrtc/base/window.h" |
| 47 | 48 |
| (...skipping 2198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2246 EXPECT_TRUE(channel1_->SetOutputVolume(0, 0.0)); | 2247 EXPECT_TRUE(channel1_->SetOutputVolume(0, 0.0)); |
| 2247 EXPECT_TRUE(media_channel1_->GetOutputVolume(0, &volume)); | 2248 EXPECT_TRUE(media_channel1_->GetOutputVolume(0, &volume)); |
| 2248 EXPECT_DOUBLE_EQ(0.0, volume); | 2249 EXPECT_DOUBLE_EQ(0.0, volume); |
| 2249 EXPECT_TRUE(media_channel1_->GetOutputVolume(1, &volume)); | 2250 EXPECT_TRUE(media_channel1_->GetOutputVolume(1, &volume)); |
| 2250 EXPECT_DOUBLE_EQ(0.0, volume); | 2251 EXPECT_DOUBLE_EQ(0.0, volume); |
| 2251 EXPECT_TRUE(media_channel1_->GetOutputVolume(2, &volume)); | 2252 EXPECT_TRUE(media_channel1_->GetOutputVolume(2, &volume)); |
| 2252 EXPECT_DOUBLE_EQ(0.0, volume); | 2253 EXPECT_DOUBLE_EQ(0.0, volume); |
| 2253 } | 2254 } |
| 2254 | 2255 |
| 2255 TEST_F(VoiceChannelTest, SendBundleToBundle) { | 2256 TEST_F(VoiceChannelTest, SendBundleToBundle) { |
| 2256 Base::SendBundleToBundle(kAudioPts, ARRAY_SIZE(kAudioPts), false, false); | 2257 Base::SendBundleToBundle(kAudioPts, arraysize(kAudioPts), false, false); |
| 2257 } | 2258 } |
| 2258 | 2259 |
| 2259 TEST_F(VoiceChannelTest, SendBundleToBundleSecure) { | 2260 TEST_F(VoiceChannelTest, SendBundleToBundleSecure) { |
| 2260 Base::SendBundleToBundle(kAudioPts, ARRAY_SIZE(kAudioPts), false, true); | 2261 Base::SendBundleToBundle(kAudioPts, arraysize(kAudioPts), false, true); |
| 2261 } | 2262 } |
| 2262 | 2263 |
| 2263 TEST_F(VoiceChannelTest, SendBundleToBundleWithRtcpMux) { | 2264 TEST_F(VoiceChannelTest, SendBundleToBundleWithRtcpMux) { |
| 2264 Base::SendBundleToBundle( | 2265 Base::SendBundleToBundle(kAudioPts, arraysize(kAudioPts), true, false); |
| 2265 kAudioPts, ARRAY_SIZE(kAudioPts), true, false); | |
| 2266 } | 2266 } |
| 2267 | 2267 |
| 2268 TEST_F(VoiceChannelTest, SendBundleToBundleWithRtcpMuxSecure) { | 2268 TEST_F(VoiceChannelTest, SendBundleToBundleWithRtcpMuxSecure) { |
| 2269 Base::SendBundleToBundle( | 2269 Base::SendBundleToBundle(kAudioPts, arraysize(kAudioPts), true, true); |
| 2270 kAudioPts, ARRAY_SIZE(kAudioPts), true, true); | |
| 2271 } | 2270 } |
| 2272 | 2271 |
| 2273 // VideoChannelTest | 2272 // VideoChannelTest |
| 2274 TEST_F(VideoChannelTest, TestInit) { | 2273 TEST_F(VideoChannelTest, TestInit) { |
| 2275 Base::TestInit(); | 2274 Base::TestInit(); |
| 2276 } | 2275 } |
| 2277 | 2276 |
| 2278 TEST_F(VideoChannelTest, TestSetContents) { | 2277 TEST_F(VideoChannelTest, TestSetContents) { |
| 2279 Base::TestSetContents(); | 2278 Base::TestSetContents(); |
| 2280 } | 2279 } |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2494 | 2493 |
| 2495 TEST_F(VideoChannelTest, TestReceivePrAnswer) { | 2494 TEST_F(VideoChannelTest, TestReceivePrAnswer) { |
| 2496 Base::TestReceivePrAnswer(); | 2495 Base::TestReceivePrAnswer(); |
| 2497 } | 2496 } |
| 2498 | 2497 |
| 2499 TEST_F(VideoChannelTest, TestFlushRtcp) { | 2498 TEST_F(VideoChannelTest, TestFlushRtcp) { |
| 2500 Base::TestFlushRtcp(); | 2499 Base::TestFlushRtcp(); |
| 2501 } | 2500 } |
| 2502 | 2501 |
| 2503 TEST_F(VideoChannelTest, SendBundleToBundle) { | 2502 TEST_F(VideoChannelTest, SendBundleToBundle) { |
| 2504 Base::SendBundleToBundle(kVideoPts, ARRAY_SIZE(kVideoPts), false, false); | 2503 Base::SendBundleToBundle(kVideoPts, arraysize(kVideoPts), false, false); |
| 2505 } | 2504 } |
| 2506 | 2505 |
| 2507 TEST_F(VideoChannelTest, SendBundleToBundleSecure) { | 2506 TEST_F(VideoChannelTest, SendBundleToBundleSecure) { |
| 2508 Base::SendBundleToBundle(kVideoPts, ARRAY_SIZE(kVideoPts), false, true); | 2507 Base::SendBundleToBundle(kVideoPts, arraysize(kVideoPts), false, true); |
| 2509 } | 2508 } |
| 2510 | 2509 |
| 2511 TEST_F(VideoChannelTest, SendBundleToBundleWithRtcpMux) { | 2510 TEST_F(VideoChannelTest, SendBundleToBundleWithRtcpMux) { |
| 2512 Base::SendBundleToBundle( | 2511 Base::SendBundleToBundle(kVideoPts, arraysize(kVideoPts), true, false); |
| 2513 kVideoPts, ARRAY_SIZE(kVideoPts), true, false); | |
| 2514 } | 2512 } |
| 2515 | 2513 |
| 2516 TEST_F(VideoChannelTest, SendBundleToBundleWithRtcpMuxSecure) { | 2514 TEST_F(VideoChannelTest, SendBundleToBundleWithRtcpMuxSecure) { |
| 2517 Base::SendBundleToBundle( | 2515 Base::SendBundleToBundle(kVideoPts, arraysize(kVideoPts), true, true); |
| 2518 kVideoPts, ARRAY_SIZE(kVideoPts), true, true); | |
| 2519 } | 2516 } |
| 2520 | 2517 |
| 2521 TEST_F(VideoChannelTest, TestSrtpError) { | 2518 TEST_F(VideoChannelTest, TestSrtpError) { |
| 2522 Base::TestSrtpError(kVideoPts[0]); | 2519 Base::TestSrtpError(kVideoPts[0]); |
| 2523 } | 2520 } |
| 2524 | 2521 |
| 2525 TEST_F(VideoChannelTest, TestOnReadyToSend) { | 2522 TEST_F(VideoChannelTest, TestOnReadyToSend) { |
| 2526 Base::TestOnReadyToSend(); | 2523 Base::TestOnReadyToSend(); |
| 2527 } | 2524 } |
| 2528 | 2525 |
| (...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2796 }; | 2793 }; |
| 2797 rtc::Buffer payload(data, 3); | 2794 rtc::Buffer payload(data, 3); |
| 2798 cricket::SendDataResult result; | 2795 cricket::SendDataResult result; |
| 2799 ASSERT_TRUE(media_channel1_->SendData(params, payload, &result)); | 2796 ASSERT_TRUE(media_channel1_->SendData(params, payload, &result)); |
| 2800 EXPECT_EQ(params.ssrc, | 2797 EXPECT_EQ(params.ssrc, |
| 2801 media_channel1_->last_sent_data_params().ssrc); | 2798 media_channel1_->last_sent_data_params().ssrc); |
| 2802 EXPECT_EQ("foo", media_channel1_->last_sent_data()); | 2799 EXPECT_EQ("foo", media_channel1_->last_sent_data()); |
| 2803 } | 2800 } |
| 2804 | 2801 |
| 2805 // TODO(pthatcher): TestSetReceiver? | 2802 // TODO(pthatcher): TestSetReceiver? |
| OLD | NEW |