OLD | NEW |
1 /* | 1 /* |
2 * libjingle | 2 * libjingle |
3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 #include "webrtc/base/logging.h" | 50 #include "webrtc/base/logging.h" |
51 #include "webrtc/base/network.h" | 51 #include "webrtc/base/network.h" |
52 #include "webrtc/base/physicalsocketserver.h" | 52 #include "webrtc/base/physicalsocketserver.h" |
53 #include "webrtc/base/ssladapter.h" | 53 #include "webrtc/base/ssladapter.h" |
54 #include "webrtc/base/sslidentity.h" | 54 #include "webrtc/base/sslidentity.h" |
55 #include "webrtc/base/sslstreamadapter.h" | 55 #include "webrtc/base/sslstreamadapter.h" |
56 #include "webrtc/base/stringutils.h" | 56 #include "webrtc/base/stringutils.h" |
57 #include "webrtc/base/thread.h" | 57 #include "webrtc/base/thread.h" |
58 #include "webrtc/base/virtualsocketserver.h" | 58 #include "webrtc/base/virtualsocketserver.h" |
59 #include "webrtc/media/base/fakemediaengine.h" | 59 #include "webrtc/media/base/fakemediaengine.h" |
| 60 #include "webrtc/media/base/fakenetworkinterface.h" |
60 #include "webrtc/media/base/fakevideorenderer.h" | 61 #include "webrtc/media/base/fakevideorenderer.h" |
61 #include "webrtc/media/base/mediachannel.h" | 62 #include "webrtc/media/base/mediachannel.h" |
62 #include "webrtc/media/webrtc/fakewebrtccall.h" | 63 #include "webrtc/media/webrtc/fakewebrtccall.h" |
63 #include "webrtc/p2p/base/stunserver.h" | 64 #include "webrtc/p2p/base/stunserver.h" |
64 #include "webrtc/p2p/base/teststunserver.h" | 65 #include "webrtc/p2p/base/teststunserver.h" |
65 #include "webrtc/p2p/base/testturnserver.h" | 66 #include "webrtc/p2p/base/testturnserver.h" |
66 #include "webrtc/p2p/base/transportchannel.h" | 67 #include "webrtc/p2p/base/transportchannel.h" |
67 #include "webrtc/p2p/client/basicportallocator.h" | 68 #include "webrtc/p2p/client/basicportallocator.h" |
68 | 69 |
69 #define MAYBE_SKIP_TEST(feature) \ | 70 #define MAYBE_SKIP_TEST(feature) \ |
(...skipping 4012 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4082 SendAudioVideoStream1(); | 4083 SendAudioVideoStream1(); |
4083 SessionDescriptionInterface* offer = CreateOffer(); | 4084 SessionDescriptionInterface* offer = CreateOffer(); |
4084 | 4085 |
4085 SetLocalDescriptionWithoutError(offer); | 4086 SetLocalDescriptionWithoutError(offer); |
4086 | 4087 |
4087 video_channel_ = media_engine_->GetVideoChannel(0); | 4088 video_channel_ = media_engine_->GetVideoChannel(0); |
4088 voice_channel_ = media_engine_->GetVoiceChannel(0); | 4089 voice_channel_ = media_engine_->GetVoiceChannel(0); |
4089 | 4090 |
4090 ASSERT_TRUE(video_channel_ != NULL); | 4091 ASSERT_TRUE(video_channel_ != NULL); |
4091 ASSERT_TRUE(voice_channel_ != NULL); | 4092 ASSERT_TRUE(voice_channel_ != NULL); |
4092 const cricket::AudioOptions& audio_options = voice_channel_->options(); | 4093 |
4093 const cricket::VideoOptions& video_options = video_channel_->options(); | 4094 cricket::FakeNetworkInterface video_network_interface; |
4094 EXPECT_EQ(rtc::Optional<bool>(true), audio_options.dscp); | 4095 cricket::FakeNetworkInterface voice_network_interface; |
4095 EXPECT_EQ(rtc::Optional<bool>(true), video_options.dscp); | 4096 video_channel_->SetInterface(&video_network_interface); |
| 4097 voice_channel_->SetInterface(&voice_network_interface); |
| 4098 EXPECT_EQ(rtc::DSCP_AF41, video_network_interface.dscp()); |
| 4099 EXPECT_EQ(rtc::DSCP_EF, voice_network_interface.dscp()); |
| 4100 video_channel_->SetInterface(NULL); |
| 4101 voice_channel_->SetInterface(NULL); |
4096 } | 4102 } |
4097 | 4103 |
4098 TEST_F(WebRtcSessionTest, TestSuspendBelowMinBitrateConstraint) { | 4104 TEST_F(WebRtcSessionTest, TestSuspendBelowMinBitrateConstraint) { |
4099 constraints_.reset(new FakeConstraints()); | 4105 constraints_.reset(new FakeConstraints()); |
4100 constraints_->AddOptional( | 4106 constraints_->AddOptional( |
4101 webrtc::MediaConstraintsInterface::kEnableVideoSuspendBelowMinBitrate, | 4107 webrtc::MediaConstraintsInterface::kEnableVideoSuspendBelowMinBitrate, |
4102 true); | 4108 true); |
4103 Init(); | 4109 Init(); |
4104 SendAudioVideoStream1(); | 4110 SendAudioVideoStream1(); |
4105 SessionDescriptionInterface* offer = CreateOffer(); | 4111 SessionDescriptionInterface* offer = CreateOffer(); |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4310 } | 4316 } |
4311 | 4317 |
4312 // TODO(bemasc): Add a TestIceStatesBundle with BUNDLE enabled. That test | 4318 // TODO(bemasc): Add a TestIceStatesBundle with BUNDLE enabled. That test |
4313 // currently fails because upon disconnection and reconnection OnIceComplete is | 4319 // currently fails because upon disconnection and reconnection OnIceComplete is |
4314 // called more than once without returning to IceGatheringGathering. | 4320 // called more than once without returning to IceGatheringGathering. |
4315 | 4321 |
4316 INSTANTIATE_TEST_CASE_P(WebRtcSessionTests, | 4322 INSTANTIATE_TEST_CASE_P(WebRtcSessionTests, |
4317 WebRtcSessionTest, | 4323 WebRtcSessionTest, |
4318 testing::Values(ALREADY_GENERATED, | 4324 testing::Values(ALREADY_GENERATED, |
4319 DTLS_IDENTITY_STORE)); | 4325 DTLS_IDENTITY_STORE)); |
OLD | NEW |