Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(31)

Side by Side Diff: webrtc/api/peerconnection_unittest.cc

Issue 2593313002: Hook up new "rtc_enable_sctp" build argument to "HAVE_SCTP" define. (Closed)
Patch Set: Use a different variable (rtc_enable_sctp). Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/api/BUILD.gn ('k') | webrtc/api/peerconnectionendtoend_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1771 matching lines...) Expand 10 before | Expand all | Expand 10 after
1782 MAYBE_SKIP_TEST(rtc::SSLStreamAdapter::HaveDtlsSrtp); 1782 MAYBE_SKIP_TEST(rtc::SSLStreamAdapter::HaveDtlsSrtp);
1783 FakeConstraints setup_constraints; 1783 FakeConstraints setup_constraints;
1784 setup_constraints.AddMandatory(MediaConstraintsInterface::kEnableDtlsSrtp, 1784 setup_constraints.AddMandatory(MediaConstraintsInterface::kEnableDtlsSrtp,
1785 true); 1785 true);
1786 ASSERT_TRUE(CreateTestClients(&setup_constraints, &setup_constraints)); 1786 ASSERT_TRUE(CreateTestClients(&setup_constraints, &setup_constraints));
1787 receiving_client()->RemoveSdesCryptoFromReceivedSdp(true); 1787 receiving_client()->RemoveSdesCryptoFromReceivedSdp(true);
1788 LocalP2PTest(); 1788 LocalP2PTest();
1789 VerifyRenderedAspectRatio(640, 480); 1789 VerifyRenderedAspectRatio(640, 480);
1790 } 1790 }
1791 1791
1792 #ifdef HAVE_SCTP
1792 // This test verifies that the negotiation will succeed with data channel only 1793 // This test verifies that the negotiation will succeed with data channel only
1793 // in max-bundle mode. 1794 // in max-bundle mode.
1794 TEST_F(P2PTestConductor, LocalP2PTestOfferDataChannelOnly) { 1795 TEST_F(P2PTestConductor, LocalP2PTestOfferDataChannelOnly) {
1795 webrtc::PeerConnectionInterface::RTCConfiguration rtc_config; 1796 webrtc::PeerConnectionInterface::RTCConfiguration rtc_config;
1796 rtc_config.bundle_policy = 1797 rtc_config.bundle_policy =
1797 webrtc::PeerConnectionInterface::kBundlePolicyMaxBundle; 1798 webrtc::PeerConnectionInterface::kBundlePolicyMaxBundle;
1798 ASSERT_TRUE(CreateTestClients(rtc_config, rtc_config)); 1799 ASSERT_TRUE(CreateTestClients(rtc_config, rtc_config));
1799 initializing_client()->CreateDataChannel(); 1800 initializing_client()->CreateDataChannel();
1800 initializing_client()->Negotiate(); 1801 initializing_client()->Negotiate();
1801 } 1802 }
1803 #endif
1802 1804
1803 // This test sets up a Jsep call between two parties, and the callee only 1805 // This test sets up a Jsep call between two parties, and the callee only
1804 // accept to receive video. 1806 // accept to receive video.
1805 TEST_F(P2PTestConductor, LocalP2PTestAnswerVideo) { 1807 TEST_F(P2PTestConductor, LocalP2PTestAnswerVideo) {
1806 ASSERT_TRUE(CreateTestClients()); 1808 ASSERT_TRUE(CreateTestClients());
1807 receiving_client()->SetReceiveAudioVideo(false, true); 1809 receiving_client()->SetReceiveAudioVideo(false, true);
1808 LocalP2PTest(); 1810 LocalP2PTest();
1809 } 1811 }
1810 1812
1811 // This test sets up a Jsep call between two parties, and the callee only 1813 // This test sets up a Jsep call between two parties, and the callee only
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
2081 EXPECT_EQ_WAIT(data, initializing_client()->data_observer()->last_message(), 2083 EXPECT_EQ_WAIT(data, initializing_client()->data_observer()->last_message(),
2082 kMaxWaitMs); 2084 kMaxWaitMs);
2083 2085
2084 receiving_client()->data_channel()->Close(); 2086 receiving_client()->data_channel()->Close();
2085 // Send new offer and answer. 2087 // Send new offer and answer.
2086 receiving_client()->Negotiate(); 2088 receiving_client()->Negotiate();
2087 EXPECT_FALSE(initializing_client()->data_observer()->IsOpen()); 2089 EXPECT_FALSE(initializing_client()->data_observer()->IsOpen());
2088 EXPECT_FALSE(receiving_client()->data_observer()->IsOpen()); 2090 EXPECT_FALSE(receiving_client()->data_observer()->IsOpen());
2089 } 2091 }
2090 2092
2093 #ifdef HAVE_SCTP
2091 // This test sets up a call between two parties with audio, video and an SCTP 2094 // This test sets up a call between two parties with audio, video and an SCTP
2092 // data channel. 2095 // data channel.
2093 TEST_F(P2PTestConductor, LocalP2PTestSctpDataChannel) { 2096 TEST_F(P2PTestConductor, LocalP2PTestSctpDataChannel) {
2094 ASSERT_TRUE(CreateTestClients()); 2097 ASSERT_TRUE(CreateTestClients());
2095 initializing_client()->CreateDataChannel(); 2098 initializing_client()->CreateDataChannel();
2096 LocalP2PTest(); 2099 LocalP2PTest();
2097 ASSERT_TRUE(initializing_client()->data_channel() != nullptr); 2100 ASSERT_TRUE(initializing_client()->data_channel() != nullptr);
2098 EXPECT_TRUE_WAIT(receiving_client()->data_channel() != nullptr, kMaxWaitMs); 2101 EXPECT_TRUE_WAIT(receiving_client()->data_channel() != nullptr, kMaxWaitMs);
2099 EXPECT_TRUE_WAIT(initializing_client()->data_observer()->IsOpen(), 2102 EXPECT_TRUE_WAIT(initializing_client()->data_observer()->IsOpen(),
2100 kMaxWaitMs); 2103 kMaxWaitMs);
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
2168 std::sort(receiving_client_received_messages.begin(), 2171 std::sort(receiving_client_received_messages.begin(),
2169 receiving_client_received_messages.end()); 2172 receiving_client_received_messages.end());
2170 EXPECT_EQ(sent_messages, initializing_client_received_messages); 2173 EXPECT_EQ(sent_messages, initializing_client_received_messages);
2171 EXPECT_EQ(sent_messages, receiving_client_received_messages); 2174 EXPECT_EQ(sent_messages, receiving_client_received_messages);
2172 2175
2173 receiving_client()->data_channel()->Close(); 2176 receiving_client()->data_channel()->Close();
2174 EXPECT_TRUE_WAIT(!initializing_client()->data_observer()->IsOpen(), 2177 EXPECT_TRUE_WAIT(!initializing_client()->data_observer()->IsOpen(),
2175 kMaxWaitMs); 2178 kMaxWaitMs);
2176 EXPECT_TRUE_WAIT(!receiving_client()->data_observer()->IsOpen(), kMaxWaitMs); 2179 EXPECT_TRUE_WAIT(!receiving_client()->data_observer()->IsOpen(), kMaxWaitMs);
2177 } 2180 }
2181 #endif // HAVE_SCTP
2178 2182
2179 // This test sets up a call between two parties and creates a data channel. 2183 // This test sets up a call between two parties and creates a data channel.
2180 // The test tests that received data is buffered unless an observer has been 2184 // The test tests that received data is buffered unless an observer has been
2181 // registered. 2185 // registered.
2182 // Rtp data channels can receive data before the underlying 2186 // Rtp data channels can receive data before the underlying
2183 // transport has detected that a channel is writable and thus data can be 2187 // transport has detected that a channel is writable and thus data can be
2184 // received before the data channel state changes to open. That is hard to test 2188 // received before the data channel state changes to open. That is hard to test
2185 // but the same buffering is used in that case. 2189 // but the same buffering is used in that case.
2186 TEST_F(P2PTestConductor, RegisterDataChannelObserver) { 2190 TEST_F(P2PTestConductor, RegisterDataChannelObserver) {
2187 FakeConstraints setup_constraints; 2191 FakeConstraints setup_constraints;
(...skipping 609 matching lines...) Expand 10 before | Expand all | Expand 10 after
2797 server.urls.push_back("turn:hostname2"); 2801 server.urls.push_back("turn:hostname2");
2798 servers.push_back(server); 2802 servers.push_back(server);
2799 EXPECT_TRUE(webrtc::ParseIceServers(servers, &stun_servers_, &turn_servers_)); 2803 EXPECT_TRUE(webrtc::ParseIceServers(servers, &stun_servers_, &turn_servers_));
2800 EXPECT_EQ(2U, turn_servers_.size()); 2804 EXPECT_EQ(2U, turn_servers_.size());
2801 EXPECT_NE(turn_servers_[0].priority, turn_servers_[1].priority); 2805 EXPECT_NE(turn_servers_[0].priority, turn_servers_[1].priority);
2802 } 2806 }
2803 2807
2804 #endif // if !defined(THREAD_SANITIZER) 2808 #endif // if !defined(THREAD_SANITIZER)
2805 2809
2806 } // namespace 2810 } // namespace
OLDNEW
« no previous file with comments | « webrtc/api/BUILD.gn ('k') | webrtc/api/peerconnectionendtoend_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698