Index: webrtc/examples/objc/AppRTCDemo/tests/ARDAppClientTest.mm |
diff --git a/webrtc/examples/objc/AppRTCDemo/tests/ARDAppClientTest.mm b/webrtc/examples/objc/AppRTCDemo/tests/ARDAppClientTest.mm |
index 2470e50c9ebd1bcaf4d30d3c60a5a49c6f11168c..b6a14d2a7090f22b6e2d57d296f301e8bf47547a 100644 |
--- a/webrtc/examples/objc/AppRTCDemo/tests/ARDAppClientTest.mm |
+++ b/webrtc/examples/objc/AppRTCDemo/tests/ARDAppClientTest.mm |
@@ -11,16 +11,17 @@ |
#import <Foundation/Foundation.h> |
#import <OCMock/OCMock.h> |
+#include "webrtc/base/gunit.h" |
+#include "webrtc/base/ssladapter.h" |
+ |
+#import "webrtc/api/objc/RTCMediaConstraints.h" |
+#import "webrtc/api/objc/RTCPeerConnectionFactory.h" |
+#import "webrtc/api/objc/RTCSessionDescription.h" |
+ |
#import "ARDAppClient+Internal.h" |
#import "ARDJoinResponse+Internal.h" |
#import "ARDMessageResponse+Internal.h" |
#import "ARDSDPUtils.h" |
-#import "RTCMediaConstraints.h" |
-#import "RTCPeerConnectionFactory.h" |
-#import "RTCSessionDescription.h" |
- |
-#include "webrtc/base/gunit.h" |
-#include "webrtc/base/ssladapter.h" |
// These classes mimic XCTest APIs, to make eventual conversion to XCTest |
// easier. Conversion will happen once XCTest is supported well on build bots. |
@@ -217,7 +218,8 @@ |
[OCMockObject niceMockForProtocol:@protocol(ARDAppClientDelegate)]; |
[[[delegate stub] andDo:^(NSInvocation *invocation) { |
connectedHandler(); |
- }] appClient:[OCMArg any] didChangeConnectionState:RTCICEConnectionConnected]; |
+ }] appClient:[OCMArg any] |
+ didChangeConnectionState:RTCIceConnectionStateConnected]; |
return [[ARDAppClient alloc] initWithRoomServerClient:roomServerClient |
signalingChannel:signalingChannel |
@@ -228,8 +230,8 @@ |
// Tests that an ICE connection is established between two ARDAppClient objects |
// where one is set up as a caller and the other the answerer. Network |
// components are mocked out and messages are relayed directly from object to |
-// object. It's expected that both clients reach the RTCICEConnectionConnected |
-// state within a reasonable amount of time. |
+// object. It's expected that both clients reach the |
+// RTCIceConnectionStateConnected state within a reasonable amount of time. |
- (void)testSession { |
// Need block arguments here because we're setting up a callbacks before we |
// create the clients. |
@@ -258,7 +260,9 @@ |
}]; |
// TODO(tkchin): Figure out why DTLS-SRTP constraint causes thread assertion |
// crash in Debug. |
- caller.defaultPeerConnectionConstraints = [[RTCMediaConstraints alloc] init]; |
+ caller.defaultPeerConnectionConstraints = |
+ [[RTCMediaConstraints alloc] initWithMandatoryConstraints:nil |
+ optionalConstraints:nil]; |
weakCaller = caller; |
answerer = [self createAppClientForRoomId:roomId |
@@ -274,7 +278,8 @@ |
// TODO(tkchin): Figure out why DTLS-SRTP constraint causes thread assertion |
// crash in Debug. |
answerer.defaultPeerConnectionConstraints = |
- [[RTCMediaConstraints alloc] init]; |
+ [[RTCMediaConstraints alloc] initWithMandatoryConstraints:nil |
+ optionalConstraints:nil]; |
weakAnswerer = answerer; |
// Kick off connection. |
@@ -301,7 +306,7 @@ |
NSString *expectedSdp = @("m=video 9 RTP/SAVPF 120 100 116 117 96\n" |
"a=rtpmap:120 H264/90000\n"); |
RTCSessionDescription* desc = |
- [[RTCSessionDescription alloc] initWithType:@"offer" sdp:sdp]; |
+ [[RTCSessionDescription alloc] initWithType:RTCSdpTypeOffer sdp:sdp]; |
RTCSessionDescription *h264Desc = |
[ARDSDPUtils descriptionForDescription:desc |
preferredVideoCodec:@"H264"]; |