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

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

Issue 2473603002: Fix the issue of setting local description with datachannel only and max-bundle. (Closed)
Patch Set: Fix the issues when setting local description with datachannel only Created 4 years, 1 month 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/peerconnection.cc ('k') | no next file » | 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 1744 matching lines...) Expand 10 before | Expand all | Expand 10 after
1755 MAYBE_SKIP_TEST(rtc::SSLStreamAdapter::HaveDtlsSrtp); 1755 MAYBE_SKIP_TEST(rtc::SSLStreamAdapter::HaveDtlsSrtp);
1756 FakeConstraints setup_constraints; 1756 FakeConstraints setup_constraints;
1757 setup_constraints.AddMandatory(MediaConstraintsInterface::kEnableDtlsSrtp, 1757 setup_constraints.AddMandatory(MediaConstraintsInterface::kEnableDtlsSrtp,
1758 true); 1758 true);
1759 ASSERT_TRUE(CreateTestClients(&setup_constraints, &setup_constraints)); 1759 ASSERT_TRUE(CreateTestClients(&setup_constraints, &setup_constraints));
1760 receiving_client()->RemoveSdesCryptoFromReceivedSdp(true); 1760 receiving_client()->RemoveSdesCryptoFromReceivedSdp(true);
1761 LocalP2PTest(); 1761 LocalP2PTest();
1762 VerifyRenderedSize(640, 480); 1762 VerifyRenderedSize(640, 480);
1763 } 1763 }
1764 1764
1765 // This test verifies that the negotiation will success with data channel only
Taylor Brandstetter 2016/11/02 23:10:22 "will success" -> "will succeed"
1766 // in max-bundle mode.
1767 TEST_F(P2PTestConductor, LocalP2PTestOfferDataChannelOnly) {
1768 webrtc::PeerConnectionInterface::RTCConfiguration rtc_config;
1769 rtc_config.bundle_policy =
1770 webrtc::PeerConnectionInterface::kBundlePolicyMaxBundle;
1771 ASSERT_TRUE(CreateTestClients(rtc_config, rtc_config));
1772 initializing_client()->CreateDataChannel();
1773 initializing_client()->AddMediaStream(false /*No audio*/, false /*No video*/);
Taylor Brandstetter 2016/11/02 23:10:22 Just curious, why is adding a media stream necessa
1774 initializing_client()->Negotiate();
1775 }
1776
1765 // This test sets up a Jsep call between two parties, and the callee only 1777 // This test sets up a Jsep call between two parties, and the callee only
1766 // accept to receive video. 1778 // accept to receive video.
1767 TEST_F(P2PTestConductor, LocalP2PTestAnswerVideo) { 1779 TEST_F(P2PTestConductor, LocalP2PTestAnswerVideo) {
1768 ASSERT_TRUE(CreateTestClients()); 1780 ASSERT_TRUE(CreateTestClients());
1769 receiving_client()->SetReceiveAudioVideo(false, true); 1781 receiving_client()->SetReceiveAudioVideo(false, true);
1770 LocalP2PTest(); 1782 LocalP2PTest();
1771 } 1783 }
1772 1784
1773 // This test sets up a Jsep call between two parties, and the callee only 1785 // This test sets up a Jsep call between two parties, and the callee only
1774 // accept to receive audio. 1786 // accept to receive audio.
(...skipping 985 matching lines...) Expand 10 before | Expand all | Expand 10 after
2760 server.urls.push_back("turn:hostname2"); 2772 server.urls.push_back("turn:hostname2");
2761 servers.push_back(server); 2773 servers.push_back(server);
2762 EXPECT_TRUE(webrtc::ParseIceServers(servers, &stun_servers_, &turn_servers_)); 2774 EXPECT_TRUE(webrtc::ParseIceServers(servers, &stun_servers_, &turn_servers_));
2763 EXPECT_EQ(2U, turn_servers_.size()); 2775 EXPECT_EQ(2U, turn_servers_.size());
2764 EXPECT_NE(turn_servers_[0].priority, turn_servers_[1].priority); 2776 EXPECT_NE(turn_servers_[0].priority, turn_servers_[1].priority);
2765 } 2777 }
2766 2778
2767 #endif // if !defined(THREAD_SANITIZER) 2779 #endif // if !defined(THREAD_SANITIZER)
2768 2780
2769 } // namespace 2781 } // namespace
OLDNEW
« no previous file with comments | « webrtc/api/peerconnection.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698