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

Unified Diff: webrtc/examples/objc/AppRTCDemo/tests/ARDAppClientTest.mm

Issue 1690313002: Update iOS AppRTCDemo to use the updated Objective-C API. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Update against master Created 4 years, 9 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
« no previous file with comments | « webrtc/examples/objc/AppRTCDemo/mac/APPRTCViewController.m ('k') | webrtc/webrtc_examples.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"];
« no previous file with comments | « webrtc/examples/objc/AppRTCDemo/mac/APPRTCViewController.m ('k') | webrtc/webrtc_examples.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698