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 3268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3279 std::unique_ptr<SessionDescriptionInterface> offer; | 3279 std::unique_ptr<SessionDescriptionInterface> offer; |
3280 ASSERT_TRUE(DoCreateOffer(&offer, nullptr)); | 3280 ASSERT_TRUE(DoCreateOffer(&offer, nullptr)); |
3281 EXPECT_TRUE(DoSetRemoteDescription(offer.release())); | 3281 EXPECT_TRUE(DoSetRemoteDescription(offer.release())); |
3282 | 3282 |
3283 // Create and set answer as well. | 3283 // Create and set answer as well. |
3284 std::unique_ptr<SessionDescriptionInterface> answer; | 3284 std::unique_ptr<SessionDescriptionInterface> answer; |
3285 ASSERT_TRUE(DoCreateAnswer(&answer, nullptr)); | 3285 ASSERT_TRUE(DoCreateAnswer(&answer, nullptr)); |
3286 EXPECT_TRUE(DoSetLocalDescription(answer.release())); | 3286 EXPECT_TRUE(DoSetLocalDescription(answer.release())); |
3287 } | 3287 } |
3288 | 3288 |
3289 TEST_F(PeerConnectionInterfaceTest, SetBitrateWithoutMinSucceeds) { | |
3290 CreatePeerConnection(); | |
3291 PeerConnectionInterface::BitrateParameters bitrate; | |
3292 bitrate.current_bitrate_bps = rtc::Optional<int>(100000); | |
3293 // Call doesn't expose its current config, so we just check that the | |
3294 // method invocation succeeds here. | |
3295 pc_->SetBitrate(bitrate); | |
3296 } | |
Taylor Brandstetter
2017/04/19 01:06:54
Can you add a basic test for the errors?
Zach Stein
2017/04/20 20:48:00
Done.
| |
3297 | |
3298 // TODO(zstein): More exhaustive tests of | |
3299 // PeerConnectionInterface::SetCallBitrate | |
3300 | |
3289 class PeerConnectionMediaConfigTest : public testing::Test { | 3301 class PeerConnectionMediaConfigTest : public testing::Test { |
3290 protected: | 3302 protected: |
3291 void SetUp() override { | 3303 void SetUp() override { |
3292 pcf_ = new rtc::RefCountedObject<PeerConnectionFactoryForTest>(); | 3304 pcf_ = new rtc::RefCountedObject<PeerConnectionFactoryForTest>(); |
3293 pcf_->Initialize(); | 3305 pcf_->Initialize(); |
3294 } | 3306 } |
3295 const cricket::MediaConfig& TestCreatePeerConnection( | 3307 const cricket::MediaConfig& TestCreatePeerConnection( |
3296 const PeerConnectionInterface::RTCConfiguration& config, | 3308 const PeerConnectionInterface::RTCConfiguration& config, |
3297 const MediaConstraintsInterface *constraints) { | 3309 const MediaConstraintsInterface *constraints) { |
3298 pcf_->create_media_controller_called_ = false; | 3310 pcf_->create_media_controller_called_ = false; |
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3573 EXPECT_NE(a, f); | 3585 EXPECT_NE(a, f); |
3574 | 3586 |
3575 PeerConnectionInterface::RTCConfiguration g; | 3587 PeerConnectionInterface::RTCConfiguration g; |
3576 g.disable_ipv6 = true; | 3588 g.disable_ipv6 = true; |
3577 EXPECT_NE(a, g); | 3589 EXPECT_NE(a, g); |
3578 | 3590 |
3579 PeerConnectionInterface::RTCConfiguration h( | 3591 PeerConnectionInterface::RTCConfiguration h( |
3580 PeerConnectionInterface::RTCConfigurationType::kAggressive); | 3592 PeerConnectionInterface::RTCConfigurationType::kAggressive); |
3581 EXPECT_NE(a, h); | 3593 EXPECT_NE(a, h); |
3582 } | 3594 } |
OLD | NEW |