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

Side by Side Diff: webrtc/sdk/objc/Framework/UnitTests/RTCPeerConnectionTest.mm

Issue 3011013002: Improve the style of the objc wrapper for PeerConnectionInterface::SetBitrate. (Closed)
Patch Set: Fix comment style. Created 3 years, 3 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 unified diff | Download patch
« no previous file with comments | « webrtc/sdk/objc/Framework/Headers/WebRTC/RTCPeerConnection.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 62
63 EXPECT_TRUE([peerConnection setBitrateToMin:[NSNumber numberWithInt:100000] 63 EXPECT_TRUE([peerConnection setBweMinBitrateBps:[NSNumber numberWithInt:1000 00]
64 toCurrent:[NSNumber numberWithInt:5000000] 64 currentBitrateBps:[NSNumber numberWithInt:5000 000]
65 toMax:[NSNumber numberWithInt:50000000 0]]); 65 maxBitrateBps:[NSNumber numberWithInt:5000 00000]]);
66 EXPECT_FALSE([peerConnection setBitrateToMin:[NSNumber numberWithInt:2] 66 EXPECT_FALSE([peerConnection setBweMinBitrateBps:[NSNumber numberWithInt:2]
67 toCurrent:[NSNumber numberWithInt:1] 67 currentBitrateBps:[NSNumber numberWithInt:1]
68 toMax:nullptr]); 68 maxBitrateBps:nil]);
69 } 69 }
70 70
71 EXPECT_EQ([config.iceServers count], [newConfig.iceServers count]); 71 EXPECT_EQ([config.iceServers count], [newConfig.iceServers count]);
72 RTCIceServer *newServer = newConfig.iceServers[0]; 72 RTCIceServer *newServer = newConfig.iceServers[0];
73 RTCIceServer *origServer = config.iceServers[0]; 73 RTCIceServer *origServer = config.iceServers[0];
74 std::string origUrl = origServer.urlStrings.firstObject.UTF8String; 74 std::string origUrl = origServer.urlStrings.firstObject.UTF8String;
75 std::string url = newServer.urlStrings.firstObject.UTF8String; 75 std::string url = newServer.urlStrings.firstObject.UTF8String;
76 EXPECT_EQ(origUrl, url); 76 EXPECT_EQ(origUrl, url);
77 77
78 EXPECT_EQ(config.iceTransportPolicy, newConfig.iceTransportPolicy); 78 EXPECT_EQ(config.iceTransportPolicy, newConfig.iceTransportPolicy);
(...skipping 13 matching lines...) Expand all
92 @end 92 @end
93 93
94 TEST(RTCPeerConnectionTest, ConfigurationGetterTest) { 94 TEST(RTCPeerConnectionTest, ConfigurationGetterTest) {
95 @autoreleasepool { 95 @autoreleasepool {
96 RTCPeerConnectionTest *test = [[RTCPeerConnectionTest alloc] init]; 96 RTCPeerConnectionTest *test = [[RTCPeerConnectionTest alloc] init];
97 [test testConfigurationGetter]; 97 [test testConfigurationGetter];
98 } 98 }
99 } 99 }
100 100
101 101
OLDNEW
« no previous file with comments | « webrtc/sdk/objc/Framework/Headers/WebRTC/RTCPeerConnection.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698