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