Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2015 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 52 | 52 |
| 53 RTCMediaConstraints *contraints = [[RTCMediaConstraints alloc] initWithMandato ryConstraints:@{} | 53 RTCMediaConstraints *contraints = [[RTCMediaConstraints alloc] initWithMandato ryConstraints:@{} |
| 54 optionalConstraints:nil]; | 54 optionalConstraints:nil]; |
| 55 RTCPeerConnectionFactory *factory = [[RTCPeerConnectionFactory alloc] init]; | 55 RTCPeerConnectionFactory *factory = [[RTCPeerConnectionFactory alloc] init]; |
| 56 | 56 |
| 57 RTCConfiguration *newConfig; | 57 RTCConfiguration *newConfig; |
| 58 @autoreleasepool { | 58 @autoreleasepool { |
| 59 RTCPeerConnection *peerConnection = | 59 RTCPeerConnection *peerConnection = |
| 60 [factory peerConnectionWithConfiguration:config constraints:contraints d elegate:nil]; | 60 [factory peerConnectionWithConfiguration:config constraints:contraints d elegate:nil]; |
| 61 newConfig = peerConnection.configuration; | 61 newConfig = peerConnection.configuration; |
| 62 | |
| 63 EXPECT_TRUE([peerConnection setBitrate:nullptr toCurrent:nullptr toMax:nullp tr]); | |
|
Zach Stein
2017/05/12 20:27:05
Maybe [peerConnection setBitrateMinBpsTo:x current
| |
| 64 EXPECT_FALSE( | |
| 65 [peerConnection setBitrate:nullptr toCurrent:[NSNumber numberWithInt:1] toMax:nullptr]); | |
| 62 } | 66 } |
| 67 | |
| 63 EXPECT_EQ([config.iceServers count], [newConfig.iceServers count]); | 68 EXPECT_EQ([config.iceServers count], [newConfig.iceServers count]); |
| 64 RTCIceServer *newServer = newConfig.iceServers[0]; | 69 RTCIceServer *newServer = newConfig.iceServers[0]; |
| 65 RTCIceServer *origServer = config.iceServers[0]; | 70 RTCIceServer *origServer = config.iceServers[0]; |
| 66 std::string origUrl = origServer.urlStrings.firstObject.UTF8String; | 71 std::string origUrl = origServer.urlStrings.firstObject.UTF8String; |
| 67 std::string url = newServer.urlStrings.firstObject.UTF8String; | 72 std::string url = newServer.urlStrings.firstObject.UTF8String; |
| 68 EXPECT_EQ(origUrl, url); | 73 EXPECT_EQ(origUrl, url); |
| 69 | 74 |
| 70 EXPECT_EQ(config.iceTransportPolicy, newConfig.iceTransportPolicy); | 75 EXPECT_EQ(config.iceTransportPolicy, newConfig.iceTransportPolicy); |
| 71 EXPECT_EQ(config.bundlePolicy, newConfig.bundlePolicy); | 76 EXPECT_EQ(config.bundlePolicy, newConfig.bundlePolicy); |
| 72 EXPECT_EQ(config.rtcpMuxPolicy, newConfig.rtcpMuxPolicy); | 77 EXPECT_EQ(config.rtcpMuxPolicy, newConfig.rtcpMuxPolicy); |
| (...skipping 11 matching lines...) Expand all Loading... | |
| 84 @end | 89 @end |
| 85 | 90 |
| 86 TEST(RTCPeerConnectionTest, ConfigurationGetterTest) { | 91 TEST(RTCPeerConnectionTest, ConfigurationGetterTest) { |
| 87 @autoreleasepool { | 92 @autoreleasepool { |
| 88 RTCPeerConnectionTest *test = [[RTCPeerConnectionTest alloc] init]; | 93 RTCPeerConnectionTest *test = [[RTCPeerConnectionTest alloc] init]; |
| 89 [test testConfigurationGetter]; | 94 [test testConfigurationGetter]; |
| 90 } | 95 } |
| 91 } | 96 } |
| 92 | 97 |
| 93 | 98 |
| OLD | NEW |