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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 config.audioJitterBufferFastAccelerate = YES; | 46 config.audioJitterBufferFastAccelerate = YES; |
47 config.iceConnectionReceivingTimeout = timeout; | 47 config.iceConnectionReceivingTimeout = timeout; |
48 config.iceBackupCandidatePairPingInterval = interval; | 48 config.iceBackupCandidatePairPingInterval = interval; |
49 config.continualGatheringPolicy = | 49 config.continualGatheringPolicy = |
50 RTCContinualGatheringPolicyGatherContinually; | 50 RTCContinualGatheringPolicyGatherContinually; |
51 config.shouldPruneTurnPorts = YES; | 51 config.shouldPruneTurnPorts = YES; |
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 RTCPeerConnection *peerConnection = [factory peerConnectionWithConfiguration:c
onfig | |
57 constraints:contraints delegate:nil]; | |
58 | 56 |
59 RTCConfiguration *newConfig = peerConnection.configuration; | 57 RTCConfiguration *newConfig; |
60 | 58 @autoreleasepool { |
| 59 RTCPeerConnection *peerConnection = |
| 60 [factory peerConnectionWithConfiguration:config constraints:contraints d
elegate:nil]; |
| 61 newConfig = peerConnection.configuration; |
| 62 } |
61 EXPECT_EQ([config.iceServers count], [newConfig.iceServers count]); | 63 EXPECT_EQ([config.iceServers count], [newConfig.iceServers count]); |
62 RTCIceServer *newServer = newConfig.iceServers[0]; | 64 RTCIceServer *newServer = newConfig.iceServers[0]; |
63 RTCIceServer *origServer = config.iceServers[0]; | 65 RTCIceServer *origServer = config.iceServers[0]; |
64 std::string origUrl = origServer.urlStrings.firstObject.UTF8String; | 66 std::string origUrl = origServer.urlStrings.firstObject.UTF8String; |
65 std::string url = newServer.urlStrings.firstObject.UTF8String; | 67 std::string url = newServer.urlStrings.firstObject.UTF8String; |
66 EXPECT_EQ(origUrl, url); | 68 EXPECT_EQ(origUrl, url); |
67 | 69 |
68 EXPECT_EQ(config.iceTransportPolicy, newConfig.iceTransportPolicy); | 70 EXPECT_EQ(config.iceTransportPolicy, newConfig.iceTransportPolicy); |
69 EXPECT_EQ(config.bundlePolicy, newConfig.bundlePolicy); | 71 EXPECT_EQ(config.bundlePolicy, newConfig.bundlePolicy); |
70 EXPECT_EQ(config.rtcpMuxPolicy, newConfig.rtcpMuxPolicy); | 72 EXPECT_EQ(config.rtcpMuxPolicy, newConfig.rtcpMuxPolicy); |
(...skipping 11 matching lines...) Expand all Loading... |
82 @end | 84 @end |
83 | 85 |
84 TEST(RTCPeerConnectionTest, ConfigurationGetterTest) { | 86 TEST(RTCPeerConnectionTest, ConfigurationGetterTest) { |
85 @autoreleasepool { | 87 @autoreleasepool { |
86 RTCPeerConnectionTest *test = [[RTCPeerConnectionTest alloc] init]; | 88 RTCPeerConnectionTest *test = [[RTCPeerConnectionTest alloc] init]; |
87 [test testConfigurationGetter]; | 89 [test testConfigurationGetter]; |
88 } | 90 } |
89 } | 91 } |
90 | 92 |
91 | 93 |
OLD | NEW |