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

Unified Diff: webrtc/sdk/objc/Framework/UnitTests/RTCConfigurationTest.mm

Issue 2976953002: iOS - Add iceRegatherIntervalRange. (Closed)
Patch Set: Created 3 years, 5 months 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/sdk/objc/Framework/UnitTests/RTCConfigurationTest.mm
diff --git a/webrtc/sdk/objc/Framework/UnitTests/RTCConfigurationTest.mm b/webrtc/sdk/objc/Framework/UnitTests/RTCConfigurationTest.mm
index df94d4f1fb15b6c68bc38413554185e406c8fced..4b44fb190c8d819cd1cb866b19164b3848bdea34 100644
--- a/webrtc/sdk/objc/Framework/UnitTests/RTCConfigurationTest.mm
+++ b/webrtc/sdk/objc/Framework/UnitTests/RTCConfigurationTest.mm
@@ -18,6 +18,7 @@
#import "RTCConfiguration+Private.h"
#import "WebRTC/RTCConfiguration.h"
#import "WebRTC/RTCIceServer.h"
+#import "WebRTC/RTCIntervalRange.h"
@interface RTCConfigurationTest : NSObject
- (void)testConversionToNativeConfiguration;
@@ -29,6 +30,7 @@
- (void)testConversionToNativeConfiguration {
NSArray *urlStrings = @[ @"stun:stun1.example.net" ];
RTCIceServer *server = [[RTCIceServer alloc] initWithURLStrings:urlStrings];
+ RTCIntervalRange *range = [[RTCIntervalRange alloc] initWithMin:0 max:100];
RTCConfiguration *config = [[RTCConfiguration alloc] init];
config.iceServers = @[ server ];
@@ -47,6 +49,7 @@
config.continualGatheringPolicy =
RTCContinualGatheringPolicyGatherContinually;
config.shouldPruneTurnPorts = YES;
+ config.iceRegatherIntervalRange = range;
std::unique_ptr<webrtc::PeerConnectionInterface::RTCConfiguration>
nativeConfig([config createNativeConfiguration]);
@@ -73,11 +76,14 @@
EXPECT_EQ(webrtc::PeerConnectionInterface::GATHER_CONTINUALLY,
nativeConfig->continual_gathering_policy);
EXPECT_EQ(true, nativeConfig->prune_turn_ports);
+ EXPECT_EQ(range.min, nativeConfig->ice_regather_interval_range->min());
+ EXPECT_EQ(range.max, nativeConfig->ice_regather_interval_range->max());
}
- (void)testNativeConversionToConfiguration {
NSArray *urlStrings = @[ @"stun:stun1.example.net" ];
RTCIceServer *server = [[RTCIceServer alloc] initWithURLStrings:urlStrings];
+ RTCIntervalRange *range = [[RTCIntervalRange alloc] initWithMin:0 max:100];
RTCConfiguration *config = [[RTCConfiguration alloc] init];
config.iceServers = @[ server ];
@@ -96,6 +102,7 @@
config.continualGatheringPolicy =
RTCContinualGatheringPolicyGatherContinually;
config.shouldPruneTurnPorts = YES;
+ config.iceRegatherIntervalRange = range;
webrtc::PeerConnectionInterface::RTCConfiguration *nativeConfig =
[config createNativeConfiguration];
@@ -121,6 +128,8 @@
newConfig.iceBackupCandidatePairPingInterval);
EXPECT_EQ(config.continualGatheringPolicy, newConfig.continualGatheringPolicy);
EXPECT_EQ(config.shouldPruneTurnPorts, newConfig.shouldPruneTurnPorts);
+ EXPECT_EQ(config.iceRegatherIntervalRange.min, newConfig.iceRegatherIntervalRange.min);
+ EXPECT_EQ(config.iceRegatherIntervalRange.max, newConfig.iceRegatherIntervalRange.max);
}
@end
« no previous file with comments | « webrtc/sdk/objc/Framework/Headers/WebRTC/WebRTC.h ('k') | webrtc/sdk/objc/Framework/UnitTests/RTCIntervalRangeTests.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698