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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 | 138 |
139 protected: | 139 protected: |
140 SignalingMessageReceiver() {} | 140 SignalingMessageReceiver() {} |
141 virtual ~SignalingMessageReceiver() {} | 141 virtual ~SignalingMessageReceiver() {} |
142 }; | 142 }; |
143 | 143 |
144 class PeerConnectionTestClient : public webrtc::PeerConnectionObserver, | 144 class PeerConnectionTestClient : public webrtc::PeerConnectionObserver, |
145 public SignalingMessageReceiver, | 145 public SignalingMessageReceiver, |
146 public ObserverInterface { | 146 public ObserverInterface { |
147 public: | 147 public: |
148 static PeerConnectionTestClient* CreateClient( | 148 static PeerConnectionTestClient* CreateClientWithDtlsIdentityStore( |
149 const std::string& id, | 149 const std::string& id, |
150 const MediaConstraintsInterface* constraints, | 150 const MediaConstraintsInterface* constraints, |
151 const PeerConnectionFactory::Options* options) { | 151 const PeerConnectionFactory::Options* options, |
| 152 rtc::scoped_ptr<webrtc::DtlsIdentityStoreInterface> dtls_identity_store) { |
152 PeerConnectionTestClient* client(new PeerConnectionTestClient(id)); | 153 PeerConnectionTestClient* client(new PeerConnectionTestClient(id)); |
153 if (!client->Init(constraints, options)) { | 154 if (!client->Init(constraints, options, dtls_identity_store.Pass())) { |
154 delete client; | 155 delete client; |
155 return nullptr; | 156 return nullptr; |
156 } | 157 } |
157 return client; | 158 return client; |
158 } | 159 } |
159 | 160 |
| 161 static PeerConnectionTestClient* CreateClient( |
| 162 const std::string& id, |
| 163 const MediaConstraintsInterface* constraints, |
| 164 const PeerConnectionFactory::Options* options) { |
| 165 rtc::scoped_ptr<FakeDtlsIdentityStore> dtls_identity_store( |
| 166 rtc::SSLStreamAdapter::HaveDtlsSrtp() ? new FakeDtlsIdentityStore() |
| 167 : nullptr); |
| 168 |
| 169 return CreateClientWithDtlsIdentityStore(id, constraints, options, |
| 170 dtls_identity_store.Pass()); |
| 171 } |
| 172 |
160 ~PeerConnectionTestClient() { | 173 ~PeerConnectionTestClient() { |
161 while (!fake_video_renderers_.empty()) { | 174 while (!fake_video_renderers_.empty()) { |
162 RenderMap::iterator it = fake_video_renderers_.begin(); | 175 RenderMap::iterator it = fake_video_renderers_.begin(); |
163 delete it->second; | 176 delete it->second; |
164 fake_video_renderers_.erase(it); | 177 fake_video_renderers_.erase(it); |
165 } | 178 } |
166 } | 179 } |
167 | 180 |
168 void Negotiate() { Negotiate(true, true); } | 181 void Negotiate() { Negotiate(true, true); } |
169 | 182 |
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
697 | 710 |
698 bool completed() const { return completed_; } | 711 bool completed() const { return completed_; } |
699 | 712 |
700 private: | 713 private: |
701 bool completed_; | 714 bool completed_; |
702 std::vector<std::string> tones_; | 715 std::vector<std::string> tones_; |
703 }; | 716 }; |
704 | 717 |
705 explicit PeerConnectionTestClient(const std::string& id) : id_(id) {} | 718 explicit PeerConnectionTestClient(const std::string& id) : id_(id) {} |
706 | 719 |
707 bool Init(const MediaConstraintsInterface* constraints, | 720 bool Init( |
708 const PeerConnectionFactory::Options* options) { | 721 const MediaConstraintsInterface* constraints, |
| 722 const PeerConnectionFactory::Options* options, |
| 723 rtc::scoped_ptr<webrtc::DtlsIdentityStoreInterface> dtls_identity_store) { |
709 EXPECT_TRUE(!peer_connection_); | 724 EXPECT_TRUE(!peer_connection_); |
710 EXPECT_TRUE(!peer_connection_factory_); | 725 EXPECT_TRUE(!peer_connection_factory_); |
711 allocator_factory_ = webrtc::FakePortAllocatorFactory::Create(); | 726 allocator_factory_ = webrtc::FakePortAllocatorFactory::Create(); |
712 if (!allocator_factory_) { | 727 if (!allocator_factory_) { |
713 return false; | 728 return false; |
714 } | 729 } |
715 fake_audio_capture_module_ = FakeAudioCaptureModule::Create(); | 730 fake_audio_capture_module_ = FakeAudioCaptureModule::Create(); |
716 | 731 |
717 if (fake_audio_capture_module_ == nullptr) { | 732 if (fake_audio_capture_module_ == nullptr) { |
718 return false; | 733 return false; |
719 } | 734 } |
720 fake_video_decoder_factory_ = new FakeWebRtcVideoDecoderFactory(); | 735 fake_video_decoder_factory_ = new FakeWebRtcVideoDecoderFactory(); |
721 fake_video_encoder_factory_ = new FakeWebRtcVideoEncoderFactory(); | 736 fake_video_encoder_factory_ = new FakeWebRtcVideoEncoderFactory(); |
722 peer_connection_factory_ = webrtc::CreatePeerConnectionFactory( | 737 peer_connection_factory_ = webrtc::CreatePeerConnectionFactory( |
723 rtc::Thread::Current(), rtc::Thread::Current(), | 738 rtc::Thread::Current(), rtc::Thread::Current(), |
724 fake_audio_capture_module_, fake_video_encoder_factory_, | 739 fake_audio_capture_module_, fake_video_encoder_factory_, |
725 fake_video_decoder_factory_); | 740 fake_video_decoder_factory_); |
726 if (!peer_connection_factory_) { | 741 if (!peer_connection_factory_) { |
727 return false; | 742 return false; |
728 } | 743 } |
729 if (options) { | 744 if (options) { |
730 peer_connection_factory_->SetOptions(*options); | 745 peer_connection_factory_->SetOptions(*options); |
731 } | 746 } |
732 peer_connection_ = CreatePeerConnection(allocator_factory_.get(), | 747 peer_connection_ = CreatePeerConnection( |
733 constraints); | 748 allocator_factory_.get(), constraints, dtls_identity_store.Pass()); |
734 return peer_connection_.get() != nullptr; | 749 return peer_connection_.get() != nullptr; |
735 } | 750 } |
736 | 751 |
737 rtc::scoped_refptr<webrtc::PeerConnectionInterface> CreatePeerConnection( | 752 rtc::scoped_refptr<webrtc::PeerConnectionInterface> CreatePeerConnection( |
738 webrtc::PortAllocatorFactoryInterface* factory, | 753 webrtc::PortAllocatorFactoryInterface* factory, |
739 const MediaConstraintsInterface* constraints) { | 754 const MediaConstraintsInterface* constraints, |
| 755 rtc::scoped_ptr<webrtc::DtlsIdentityStoreInterface> dtls_identity_store) { |
740 // CreatePeerConnection with IceServers. | 756 // CreatePeerConnection with IceServers. |
741 webrtc::PeerConnectionInterface::IceServers ice_servers; | 757 webrtc::PeerConnectionInterface::IceServers ice_servers; |
742 webrtc::PeerConnectionInterface::IceServer ice_server; | 758 webrtc::PeerConnectionInterface::IceServer ice_server; |
743 ice_server.uri = "stun:stun.l.google.com:19302"; | 759 ice_server.uri = "stun:stun.l.google.com:19302"; |
744 ice_servers.push_back(ice_server); | 760 ice_servers.push_back(ice_server); |
745 | 761 |
746 rtc::scoped_ptr<webrtc::DtlsIdentityStoreInterface> dtls_identity_store( | |
747 rtc::SSLStreamAdapter::HaveDtlsSrtp() ? new FakeDtlsIdentityStore() | |
748 : nullptr); | |
749 return peer_connection_factory_->CreatePeerConnection( | 762 return peer_connection_factory_->CreatePeerConnection( |
750 ice_servers, constraints, factory, dtls_identity_store.Pass(), this); | 763 ice_servers, constraints, factory, dtls_identity_store.Pass(), this); |
751 } | 764 } |
752 | 765 |
753 void HandleIncomingOffer(const std::string& msg) { | 766 void HandleIncomingOffer(const std::string& msg) { |
754 LOG(INFO) << id_ << "HandleIncomingOffer "; | 767 LOG(INFO) << id_ << "HandleIncomingOffer "; |
755 if (NumberOfLocalMediaStreams() == 0 && auto_add_stream_) { | 768 if (NumberOfLocalMediaStreams() == 0 && auto_add_stream_) { |
756 // If we are not sending any streams ourselves it is time to add some. | 769 // If we are not sending any streams ourselves it is time to add some. |
757 AddMediaStream(true, true); | 770 AddMediaStream(true, true); |
758 } | 771 } |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
972 } | 985 } |
973 | 986 |
974 bool CreateTestClients() { return CreateTestClients(nullptr, nullptr); } | 987 bool CreateTestClients() { return CreateTestClients(nullptr, nullptr); } |
975 | 988 |
976 bool CreateTestClients(MediaConstraintsInterface* init_constraints, | 989 bool CreateTestClients(MediaConstraintsInterface* init_constraints, |
977 MediaConstraintsInterface* recv_constraints) { | 990 MediaConstraintsInterface* recv_constraints) { |
978 return CreateTestClients(init_constraints, nullptr, recv_constraints, | 991 return CreateTestClients(init_constraints, nullptr, recv_constraints, |
979 nullptr); | 992 nullptr); |
980 } | 993 } |
981 | 994 |
| 995 void SetSignalingReceivers() { |
| 996 initiating_client_->set_signaling_message_receiver(receiving_client_.get()); |
| 997 receiving_client_->set_signaling_message_receiver(initiating_client_.get()); |
| 998 } |
| 999 |
982 bool CreateTestClients(MediaConstraintsInterface* init_constraints, | 1000 bool CreateTestClients(MediaConstraintsInterface* init_constraints, |
983 PeerConnectionFactory::Options* init_options, | 1001 PeerConnectionFactory::Options* init_options, |
984 MediaConstraintsInterface* recv_constraints, | 1002 MediaConstraintsInterface* recv_constraints, |
985 PeerConnectionFactory::Options* recv_options) { | 1003 PeerConnectionFactory::Options* recv_options) { |
986 initiating_client_.reset(PeerConnectionTestClient::CreateClient( | 1004 initiating_client_.reset(PeerConnectionTestClient::CreateClient( |
987 "Caller: ", init_constraints, init_options)); | 1005 "Caller: ", init_constraints, init_options)); |
988 receiving_client_.reset(PeerConnectionTestClient::CreateClient( | 1006 receiving_client_.reset(PeerConnectionTestClient::CreateClient( |
989 "Callee: ", recv_constraints, recv_options)); | 1007 "Callee: ", recv_constraints, recv_options)); |
990 if (!initiating_client_ || !receiving_client_) { | 1008 if (!initiating_client_ || !receiving_client_) { |
991 return false; | 1009 return false; |
992 } | 1010 } |
993 initiating_client_->set_signaling_message_receiver(receiving_client_.get()); | 1011 SetSignalingReceivers(); |
994 receiving_client_->set_signaling_message_receiver(initiating_client_.get()); | |
995 return true; | 1012 return true; |
996 } | 1013 } |
997 | 1014 |
998 void SetVideoConstraints(const webrtc::FakeConstraints& init_constraints, | 1015 void SetVideoConstraints(const webrtc::FakeConstraints& init_constraints, |
999 const webrtc::FakeConstraints& recv_constraints) { | 1016 const webrtc::FakeConstraints& recv_constraints) { |
1000 initiating_client_->SetVideoConstraints(init_constraints); | 1017 initiating_client_->SetVideoConstraints(init_constraints); |
1001 receiving_client_->SetVideoConstraints(recv_constraints); | 1018 receiving_client_->SetVideoConstraints(recv_constraints); |
1002 } | 1019 } |
1003 | 1020 |
1004 void EnableVideoDecoderFactory() { | 1021 void EnableVideoDecoderFactory() { |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1061 receiving_client_->can_receive_video()) { | 1078 receiving_client_->can_receive_video()) { |
1062 EXPECT_EQ_WAIT(webrtc::PeerConnectionInterface::kIceGatheringComplete, | 1079 EXPECT_EQ_WAIT(webrtc::PeerConnectionInterface::kIceGatheringComplete, |
1063 receiving_client_->ice_gathering_state(), | 1080 receiving_client_->ice_gathering_state(), |
1064 kMaxWaitForFramesMs); | 1081 kMaxWaitForFramesMs); |
1065 } | 1082 } |
1066 | 1083 |
1067 EXPECT_TRUE_WAIT(FramesNotPending(audio_frame_count, video_frame_count), | 1084 EXPECT_TRUE_WAIT(FramesNotPending(audio_frame_count, video_frame_count), |
1068 kMaxWaitForFramesMs); | 1085 kMaxWaitForFramesMs); |
1069 } | 1086 } |
1070 | 1087 |
| 1088 void SetupAndVerifyDtlsCall() { |
| 1089 MAYBE_SKIP_TEST(rtc::SSLStreamAdapter::HaveDtlsSrtp); |
| 1090 FakeConstraints setup_constraints; |
| 1091 setup_constraints.AddMandatory(MediaConstraintsInterface::kEnableDtlsSrtp, |
| 1092 true); |
| 1093 ASSERT_TRUE(CreateTestClients(&setup_constraints, &setup_constraints)); |
| 1094 LocalP2PTest(); |
| 1095 VerifyRenderedSize(640, 480); |
| 1096 } |
| 1097 |
| 1098 PeerConnectionTestClient* CreateDtlsClientWithAlternateKey() { |
| 1099 FakeConstraints setup_constraints; |
| 1100 setup_constraints.AddMandatory(MediaConstraintsInterface::kEnableDtlsSrtp, |
| 1101 true); |
| 1102 |
| 1103 rtc::scoped_ptr<FakeDtlsIdentityStore> dtls_identity_store( |
| 1104 rtc::SSLStreamAdapter::HaveDtlsSrtp() ? new FakeDtlsIdentityStore() |
| 1105 : nullptr); |
| 1106 dtls_identity_store->use_alternate_key(); |
| 1107 |
| 1108 // Make sure the new client is using a different certificate. |
| 1109 return PeerConnectionTestClient::CreateClientWithDtlsIdentityStore( |
| 1110 "New Peer: ", &setup_constraints, nullptr, dtls_identity_store.Pass()); |
| 1111 } |
| 1112 |
1071 void SendRtpData(webrtc::DataChannelInterface* dc, const std::string& data) { | 1113 void SendRtpData(webrtc::DataChannelInterface* dc, const std::string& data) { |
1072 // Messages may get lost on the unreliable DataChannel, so we send multiple | 1114 // Messages may get lost on the unreliable DataChannel, so we send multiple |
1073 // times to avoid test flakiness. | 1115 // times to avoid test flakiness. |
1074 static const size_t kSendAttempts = 5; | 1116 static const size_t kSendAttempts = 5; |
1075 | 1117 |
1076 for (size_t i = 0; i < kSendAttempts; ++i) { | 1118 for (size_t i = 0; i < kSendAttempts; ++i) { |
1077 dc->Send(DataBuffer(data)); | 1119 dc->Send(DataBuffer(data)); |
1078 } | 1120 } |
1079 } | 1121 } |
1080 | 1122 |
1081 PeerConnectionTestClient* initializing_client() { | 1123 PeerConnectionTestClient* initializing_client() { |
1082 return initiating_client_.get(); | 1124 return initiating_client_.get(); |
1083 } | 1125 } |
| 1126 |
| 1127 // Set the |initiating_client_| to the |client| passed in and return the |
| 1128 // original |initiating_client_|. |
| 1129 PeerConnectionTestClient* set_initializing_client( |
| 1130 PeerConnectionTestClient* client) { |
| 1131 PeerConnectionTestClient* old = initiating_client_.release(); |
| 1132 initiating_client_.reset(client); |
| 1133 return old; |
| 1134 } |
| 1135 |
1084 PeerConnectionTestClient* receiving_client() { | 1136 PeerConnectionTestClient* receiving_client() { |
1085 return receiving_client_.get(); | 1137 return receiving_client_.get(); |
1086 } | 1138 } |
1087 | 1139 |
| 1140 // Set the |receiving_client_| to the |client| passed in and return the |
| 1141 // original |receiving_client_|. |
| 1142 PeerConnectionTestClient* set_receiving_client( |
| 1143 PeerConnectionTestClient* client) { |
| 1144 PeerConnectionTestClient* old = receiving_client_.release(); |
| 1145 receiving_client_.reset(client); |
| 1146 return old; |
| 1147 } |
| 1148 |
1088 private: | 1149 private: |
1089 rtc::scoped_ptr<rtc::PhysicalSocketServer> pss_; | 1150 rtc::scoped_ptr<rtc::PhysicalSocketServer> pss_; |
1090 rtc::scoped_ptr<rtc::VirtualSocketServer> ss_; | 1151 rtc::scoped_ptr<rtc::VirtualSocketServer> ss_; |
1091 rtc::SocketServerScope ss_scope_; | 1152 rtc::SocketServerScope ss_scope_; |
1092 rtc::scoped_ptr<PeerConnectionTestClient> initiating_client_; | 1153 rtc::scoped_ptr<PeerConnectionTestClient> initiating_client_; |
1093 rtc::scoped_ptr<PeerConnectionTestClient> receiving_client_; | 1154 rtc::scoped_ptr<PeerConnectionTestClient> receiving_client_; |
1094 }; | 1155 }; |
1095 | 1156 |
1096 // Disable for TSan v2, see | 1157 // Disable for TSan v2, see |
1097 // https://code.google.com/p/webrtc/issues/detail?id=1205 for details. | 1158 // https://code.google.com/p/webrtc/issues/detail?id=1205 for details. |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1139 constraint.SetMandatoryMinWidth(1280); | 1200 constraint.SetMandatoryMinWidth(1280); |
1140 constraint.SetMandatoryMinHeight(720); | 1201 constraint.SetMandatoryMinHeight(720); |
1141 SetVideoConstraints(constraint, constraint); | 1202 SetVideoConstraints(constraint, constraint); |
1142 LocalP2PTest(); | 1203 LocalP2PTest(); |
1143 VerifyRenderedSize(1280, 720); | 1204 VerifyRenderedSize(1280, 720); |
1144 } | 1205 } |
1145 | 1206 |
1146 // This test sets up a call between two endpoints that are configured to use | 1207 // This test sets up a call between two endpoints that are configured to use |
1147 // DTLS key agreement. As a result, DTLS is negotiated and used for transport. | 1208 // DTLS key agreement. As a result, DTLS is negotiated and used for transport. |
1148 TEST_F(MAYBE_JsepPeerConnectionP2PTestClient, LocalP2PTestDtls) { | 1209 TEST_F(MAYBE_JsepPeerConnectionP2PTestClient, LocalP2PTestDtls) { |
1149 MAYBE_SKIP_TEST(rtc::SSLStreamAdapter::HaveDtlsSrtp); | 1210 SetupAndVerifyDtlsCall(); |
1150 FakeConstraints setup_constraints; | |
1151 setup_constraints.AddMandatory(MediaConstraintsInterface::kEnableDtlsSrtp, | |
1152 true); | |
1153 ASSERT_TRUE(CreateTestClients(&setup_constraints, &setup_constraints)); | |
1154 LocalP2PTest(); | |
1155 VerifyRenderedSize(640, 480); | |
1156 } | 1211 } |
1157 | 1212 |
1158 // This test sets up a audio call initially and then upgrades to audio/video, | 1213 // This test sets up a audio call initially and then upgrades to audio/video, |
1159 // using DTLS. | 1214 // using DTLS. |
1160 TEST_F(MAYBE_JsepPeerConnectionP2PTestClient, LocalP2PTestDtlsRenegotiate) { | 1215 TEST_F(MAYBE_JsepPeerConnectionP2PTestClient, LocalP2PTestDtlsRenegotiate) { |
1161 MAYBE_SKIP_TEST(rtc::SSLStreamAdapter::HaveDtlsSrtp); | 1216 MAYBE_SKIP_TEST(rtc::SSLStreamAdapter::HaveDtlsSrtp); |
1162 FakeConstraints setup_constraints; | 1217 FakeConstraints setup_constraints; |
1163 setup_constraints.AddMandatory(MediaConstraintsInterface::kEnableDtlsSrtp, | 1218 setup_constraints.AddMandatory(MediaConstraintsInterface::kEnableDtlsSrtp, |
1164 true); | 1219 true); |
1165 ASSERT_TRUE(CreateTestClients(&setup_constraints, &setup_constraints)); | 1220 ASSERT_TRUE(CreateTestClients(&setup_constraints, &setup_constraints)); |
1166 receiving_client()->SetReceiveAudioVideo(true, false); | 1221 receiving_client()->SetReceiveAudioVideo(true, false); |
1167 LocalP2PTest(); | 1222 LocalP2PTest(); |
1168 receiving_client()->SetReceiveAudioVideo(true, true); | 1223 receiving_client()->SetReceiveAudioVideo(true, true); |
1169 receiving_client()->Negotiate(); | 1224 receiving_client()->Negotiate(); |
1170 } | 1225 } |
1171 | 1226 |
| 1227 // This test sets up a call transfer to a new caller with a different DTLS |
| 1228 // fingerprint. |
| 1229 TEST_F(MAYBE_JsepPeerConnectionP2PTestClient, LocalP2PTestDtlsTransferCallee) { |
| 1230 MAYBE_SKIP_TEST(rtc::SSLStreamAdapter::HaveDtlsSrtp); |
| 1231 SetupAndVerifyDtlsCall(); |
| 1232 |
| 1233 // Keeping the original peer around which will still send packets to the |
| 1234 // receiving client. These SRTP packets will be dropped. |
| 1235 rtc::scoped_ptr<PeerConnectionTestClient> original_peer( |
| 1236 set_initializing_client(CreateDtlsClientWithAlternateKey())); |
| 1237 original_peer->pc()->Close(); |
| 1238 |
| 1239 SetSignalingReceivers(); |
| 1240 receiving_client()->SetExpectIceRestart(true); |
| 1241 LocalP2PTest(); |
| 1242 VerifyRenderedSize(640, 480); |
| 1243 } |
| 1244 |
| 1245 // This test sets up a call transfer to a new callee with a different DTLS |
| 1246 // fingerprint. |
| 1247 TEST_F(MAYBE_JsepPeerConnectionP2PTestClient, LocalP2PTestDtlsTransferCaller) { |
| 1248 MAYBE_SKIP_TEST(rtc::SSLStreamAdapter::HaveDtlsSrtp); |
| 1249 SetupAndVerifyDtlsCall(); |
| 1250 |
| 1251 // Keeping the original peer around which will still send packets to the |
| 1252 // receiving client. These SRTP packets will be dropped. |
| 1253 rtc::scoped_ptr<PeerConnectionTestClient> original_peer( |
| 1254 set_receiving_client(CreateDtlsClientWithAlternateKey())); |
| 1255 original_peer->pc()->Close(); |
| 1256 |
| 1257 SetSignalingReceivers(); |
| 1258 initializing_client()->IceRestart(); |
| 1259 LocalP2PTest(); |
| 1260 VerifyRenderedSize(640, 480); |
| 1261 } |
| 1262 |
1172 // This test sets up a call between two endpoints that are configured to use | 1263 // This test sets up a call between two endpoints that are configured to use |
1173 // DTLS key agreement. The offerer don't support SDES. As a result, DTLS is | 1264 // DTLS key agreement. The offerer don't support SDES. As a result, DTLS is |
1174 // negotiated and used for transport. | 1265 // negotiated and used for transport. |
1175 TEST_F(MAYBE_JsepPeerConnectionP2PTestClient, LocalP2PTestOfferDtlsButNotSdes) { | 1266 TEST_F(MAYBE_JsepPeerConnectionP2PTestClient, LocalP2PTestOfferDtlsButNotSdes) { |
1176 MAYBE_SKIP_TEST(rtc::SSLStreamAdapter::HaveDtlsSrtp); | 1267 MAYBE_SKIP_TEST(rtc::SSLStreamAdapter::HaveDtlsSrtp); |
1177 FakeConstraints setup_constraints; | 1268 FakeConstraints setup_constraints; |
1178 setup_constraints.AddMandatory(MediaConstraintsInterface::kEnableDtlsSrtp, | 1269 setup_constraints.AddMandatory(MediaConstraintsInterface::kEnableDtlsSrtp, |
1179 true); | 1270 true); |
1180 ASSERT_TRUE(CreateTestClients(&setup_constraints, &setup_constraints)); | 1271 ASSERT_TRUE(CreateTestClients(&setup_constraints, &setup_constraints)); |
1181 receiving_client()->RemoveSdesCryptoFromReceivedSdp(true); | 1272 receiving_client()->RemoveSdesCryptoFromReceivedSdp(true); |
(...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1882 server.urls.push_back("stun:hostname"); | 1973 server.urls.push_back("stun:hostname"); |
1883 server.urls.push_back("turn:hostname"); | 1974 server.urls.push_back("turn:hostname"); |
1884 servers.push_back(server); | 1975 servers.push_back(server); |
1885 EXPECT_TRUE(webrtc::ParseIceServers(servers, &stun_configurations_, | 1976 EXPECT_TRUE(webrtc::ParseIceServers(servers, &stun_configurations_, |
1886 &turn_configurations_)); | 1977 &turn_configurations_)); |
1887 EXPECT_EQ(1U, stun_configurations_.size()); | 1978 EXPECT_EQ(1U, stun_configurations_.size()); |
1888 EXPECT_EQ(1U, turn_configurations_.size()); | 1979 EXPECT_EQ(1U, turn_configurations_.size()); |
1889 } | 1980 } |
1890 | 1981 |
1891 #endif // if !defined(THREAD_SANITIZER) | 1982 #endif // if !defined(THREAD_SANITIZER) |
OLD | NEW |