| 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 config.audioJitterBufferMaxPackets = maxPackets; | 92 config.audioJitterBufferMaxPackets = maxPackets; |
| 93 config.audioJitterBufferFastAccelerate = YES; | 93 config.audioJitterBufferFastAccelerate = YES; |
| 94 config.iceConnectionReceivingTimeout = timeout; | 94 config.iceConnectionReceivingTimeout = timeout; |
| 95 config.iceBackupCandidatePairPingInterval = interval; | 95 config.iceBackupCandidatePairPingInterval = interval; |
| 96 config.continualGatheringPolicy = | 96 config.continualGatheringPolicy = |
| 97 RTCContinualGatheringPolicyGatherContinually; | 97 RTCContinualGatheringPolicyGatherContinually; |
| 98 config.shouldPruneTurnPorts = YES; | 98 config.shouldPruneTurnPorts = YES; |
| 99 | 99 |
| 100 webrtc::PeerConnectionInterface::RTCConfiguration *nativeConfig = | 100 webrtc::PeerConnectionInterface::RTCConfiguration *nativeConfig = |
| 101 [config createNativeConfiguration]; | 101 [config createNativeConfiguration]; |
| 102 RTCConfiguration *newConfig = [[RTCConfiguration alloc] initWithNativeConfigur
ation:nativeConfig]; | 102 RTCConfiguration *newConfig = [[RTCConfiguration alloc] |
| 103 initWithNativeConfiguration:*nativeConfig]; |
| 103 EXPECT_EQ([config.iceServers count], newConfig.iceServers.count); | 104 EXPECT_EQ([config.iceServers count], newConfig.iceServers.count); |
| 104 RTCIceServer *newServer = newConfig.iceServers[0]; | 105 RTCIceServer *newServer = newConfig.iceServers[0]; |
| 105 RTCIceServer *origServer = config.iceServers[0]; | 106 RTCIceServer *origServer = config.iceServers[0]; |
| 106 EXPECT_EQ(origServer.urlStrings.count, server.urlStrings.count); | 107 EXPECT_EQ(origServer.urlStrings.count, server.urlStrings.count); |
| 107 std::string origUrl = origServer.urlStrings.firstObject.UTF8String; | 108 std::string origUrl = origServer.urlStrings.firstObject.UTF8String; |
| 108 std::string url = newServer.urlStrings.firstObject.UTF8String; | 109 std::string url = newServer.urlStrings.firstObject.UTF8String; |
| 109 EXPECT_EQ(origUrl, url); | 110 EXPECT_EQ(origUrl, url); |
| 110 | 111 |
| 111 EXPECT_EQ(config.iceTransportPolicy, newConfig.iceTransportPolicy); | 112 EXPECT_EQ(config.iceTransportPolicy, newConfig.iceTransportPolicy); |
| 112 EXPECT_EQ(config.bundlePolicy, newConfig.bundlePolicy); | 113 EXPECT_EQ(config.bundlePolicy, newConfig.bundlePolicy); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 125 @end | 126 @end |
| 126 | 127 |
| 127 TEST(RTCConfigurationTest, NativeConfigurationConversionTest) { | 128 TEST(RTCConfigurationTest, NativeConfigurationConversionTest) { |
| 128 @autoreleasepool { | 129 @autoreleasepool { |
| 129 RTCConfigurationTest *test = [[RTCConfigurationTest alloc] init]; | 130 RTCConfigurationTest *test = [[RTCConfigurationTest alloc] init]; |
| 130 [test testConversionToNativeConfiguration]; | 131 [test testConversionToNativeConfiguration]; |
| 131 [test testNativeConversionToConfiguration]; | 132 [test testNativeConversionToConfiguration]; |
| 132 } | 133 } |
| 133 } | 134 } |
| 134 | 135 |
| OLD | NEW |