OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2012 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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
204 offer->description()->GetContentByName("video")->rejected = !video; | 204 offer->description()->GetContentByName("video")->rejected = !video; |
205 } | 205 } |
206 | 206 |
207 std::string sdp; | 207 std::string sdp; |
208 EXPECT_TRUE(offer->ToString(&sdp)); | 208 EXPECT_TRUE(offer->ToString(&sdp)); |
209 EXPECT_TRUE(DoSetLocalDescription(offer.release())); | 209 EXPECT_TRUE(DoSetLocalDescription(offer.release())); |
210 signaling_message_receiver_->ReceiveSdpMessage( | 210 signaling_message_receiver_->ReceiveSdpMessage( |
211 webrtc::SessionDescriptionInterface::kOffer, sdp); | 211 webrtc::SessionDescriptionInterface::kOffer, sdp); |
212 } | 212 } |
213 | 213 |
214 void NegotiateQuic() { | |
215 rtc::scoped_ptr<SessionDescriptionInterface> offer; | |
216 ASSERT_TRUE(DoCreateOffer(&offer)); | |
217 offer->description()->set_quic(true); | |
218 std::string sdp; | |
219 EXPECT_TRUE(offer->ToString(&sdp)); | |
220 EXPECT_TRUE(DoSetLocalDescription(offer.release())); | |
221 signaling_message_receiver_->ReceiveSdpMessage( | |
222 webrtc::SessionDescriptionInterface::kOffer, sdp); | |
223 } | |
224 | |
214 // SignalingMessageReceiver callback. | 225 // SignalingMessageReceiver callback. |
215 void ReceiveSdpMessage(const std::string& type, std::string& msg) override { | 226 void ReceiveSdpMessage(const std::string& type, std::string& msg) override { |
216 FilterIncomingSdpMessage(&msg); | 227 FilterIncomingSdpMessage(&msg); |
217 if (type == webrtc::SessionDescriptionInterface::kOffer) { | 228 if (type == webrtc::SessionDescriptionInterface::kOffer) { |
218 HandleIncomingOffer(msg); | 229 HandleIncomingOffer(msg); |
219 } else { | 230 } else { |
220 HandleIncomingAnswer(msg); | 231 HandleIncomingAnswer(msg); |
221 } | 232 } |
222 } | 233 } |
223 | 234 |
(...skipping 1633 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1857 MAYBE_SKIP_TEST(rtc::SSLStreamAdapter::HaveDtlsSrtp); | 1868 MAYBE_SKIP_TEST(rtc::SSLStreamAdapter::HaveDtlsSrtp); |
1858 FakeConstraints constraints; | 1869 FakeConstraints constraints; |
1859 constraints.SetMandatory( | 1870 constraints.SetMandatory( |
1860 MediaConstraintsInterface::kEnableDtlsSrtp, true); | 1871 MediaConstraintsInterface::kEnableDtlsSrtp, true); |
1861 ASSERT_TRUE(CreateTestClients(&constraints, &constraints)); | 1872 ASSERT_TRUE(CreateTestClients(&constraints, &constraints)); |
1862 initializing_client()->CreateDataChannel(); | 1873 initializing_client()->CreateDataChannel(); |
1863 initializing_client()->Negotiate(false, false); | 1874 initializing_client()->Negotiate(false, false); |
1864 } | 1875 } |
1865 #endif | 1876 #endif |
1866 | 1877 |
1878 // Tests usage of QUIC data channels when the offerer wants to use QUIC. | |
1879 #ifdef USE_QUIC | |
1880 TEST_F(P2PTestConductor, CreateOfferWithQuicDataChannel) { | |
1881 FakeConstraints constraints; | |
1882 constraints.SetMandatory(MediaConstraintsInterface::kEnableDtlsSrtp, true); | |
1883 ASSERT_TRUE(CreateTestClients(&constraints, &constraints)); | |
1884 initializing_client()->NegotiateQuic(); | |
1885 initializing_client()->CreateDataChannel(); | |
pthatcher1
2016/03/30 20:34:48
I assume this will do more in the future.
mikescarlett
2016/04/05 19:58:49
Yes it will.
| |
1886 } | |
1887 #endif | |
1888 | |
1867 // This test sets up a call between two parties with audio, and video. | 1889 // This test sets up a call between two parties with audio, and video. |
1868 // During the call, the initializing side restart ice and the test verifies that | 1890 // During the call, the initializing side restart ice and the test verifies that |
1869 // new ice candidates are generated and audio and video still can flow. | 1891 // new ice candidates are generated and audio and video still can flow. |
1870 TEST_F(P2PTestConductor, IceRestart) { | 1892 TEST_F(P2PTestConductor, IceRestart) { |
1871 ASSERT_TRUE(CreateTestClients()); | 1893 ASSERT_TRUE(CreateTestClients()); |
1872 | 1894 |
1873 // Negotiate and wait for ice completion and make sure audio and video plays. | 1895 // Negotiate and wait for ice completion and make sure audio and video plays. |
1874 LocalP2PTest(); | 1896 LocalP2PTest(); |
1875 | 1897 |
1876 // Create a SDP string of the first audio candidate for both clients. | 1898 // Create a SDP string of the first audio candidate for both clients. |
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2162 server.urls.push_back("turn:hostname2"); | 2184 server.urls.push_back("turn:hostname2"); |
2163 servers.push_back(server); | 2185 servers.push_back(server); |
2164 EXPECT_TRUE(webrtc::ParseIceServers(servers, &stun_servers_, &turn_servers_)); | 2186 EXPECT_TRUE(webrtc::ParseIceServers(servers, &stun_servers_, &turn_servers_)); |
2165 EXPECT_EQ(2U, turn_servers_.size()); | 2187 EXPECT_EQ(2U, turn_servers_.size()); |
2166 EXPECT_NE(turn_servers_[0].priority, turn_servers_[1].priority); | 2188 EXPECT_NE(turn_servers_[0].priority, turn_servers_[1].priority); |
2167 } | 2189 } |
2168 | 2190 |
2169 #endif // if !defined(THREAD_SANITIZER) | 2191 #endif // if !defined(THREAD_SANITIZER) |
2170 | 2192 |
2171 } // namespace | 2193 } // namespace |
OLD | NEW |