OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2014 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 |
11 #import <Foundation/Foundation.h> | 11 #import <Foundation/Foundation.h> |
12 #import <OCMock/OCMock.h> | 12 #import <OCMock/OCMock.h> |
13 #import <QuartzCore/CoreAnimation.h> | 13 #import <QuartzCore/CoreAnimation.h> |
14 #import <XCTest/XCTest.h> | 14 #import <XCTest/XCTest.h> |
15 | 15 |
16 #include "webrtc/base/ssladapter.h" | 16 #include "webrtc/base/ssladapter.h" |
17 | 17 |
18 #import "WebRTC/RTCMediaConstraints.h" | 18 #import "WebRTC/RTCMediaConstraints.h" |
19 #import "WebRTC/RTCPeerConnectionFactory.h" | 19 #import "WebRTC/RTCPeerConnectionFactory.h" |
20 | 20 |
21 #import "ARDAppClient+Internal.h" | 21 #import "ARDAppClient+Internal.h" |
22 #import "ARDJoinResponse+Internal.h" | 22 #import "ARDJoinResponse+Internal.h" |
23 #import "ARDMessageResponse+Internal.h" | 23 #import "ARDMessageResponse+Internal.h" |
24 #import "ARDSDPUtils.h" | 24 #import "ARDSDPUtils.h" |
| 25 #import "ARDSettingsModel.h" |
25 | 26 |
26 @interface ARDAppClientTest : XCTestCase | 27 @interface ARDAppClientTest : XCTestCase |
27 @end | 28 @end |
28 | 29 |
29 @implementation ARDAppClientTest | 30 @implementation ARDAppClientTest |
30 | 31 |
31 #pragma mark - Mock helpers | 32 #pragma mark - Mock helpers |
32 | 33 |
33 - (id)mockRoomServerClientForRoomId:(NSString *)roomId | 34 - (id)mockRoomServerClientForRoomId:(NSString *)roomId |
34 clientId:(NSString *)clientId | 35 clientId:(NSString *)clientId |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 }]; | 203 }]; |
203 // TODO(tkchin): Figure out why DTLS-SRTP constraint causes thread assertion | 204 // TODO(tkchin): Figure out why DTLS-SRTP constraint causes thread assertion |
204 // crash in Debug. | 205 // crash in Debug. |
205 answerer.defaultPeerConnectionConstraints = | 206 answerer.defaultPeerConnectionConstraints = |
206 [[RTCMediaConstraints alloc] initWithMandatoryConstraints:nil | 207 [[RTCMediaConstraints alloc] initWithMandatoryConstraints:nil |
207 optionalConstraints:nil]; | 208 optionalConstraints:nil]; |
208 weakAnswerer = answerer; | 209 weakAnswerer = answerer; |
209 | 210 |
210 // Kick off connection. | 211 // Kick off connection. |
211 [caller connectToRoomWithId:roomId | 212 [caller connectToRoomWithId:roomId |
| 213 settings:[[ARDSettingsModel alloc] init] |
212 isLoopback:NO | 214 isLoopback:NO |
213 isAudioOnly:NO | 215 isAudioOnly:NO |
214 shouldMakeAecDump:NO | 216 shouldMakeAecDump:NO |
215 shouldUseLevelControl:NO]; | 217 shouldUseLevelControl:NO]; |
216 [answerer connectToRoomWithId:roomId | 218 [answerer connectToRoomWithId:roomId |
| 219 settings:[[ARDSettingsModel alloc] init] |
217 isLoopback:NO | 220 isLoopback:NO |
218 isAudioOnly:NO | 221 isAudioOnly:NO |
219 shouldMakeAecDump:NO | 222 shouldMakeAecDump:NO |
220 shouldUseLevelControl:NO]; | 223 shouldUseLevelControl:NO]; |
221 [self waitForExpectationsWithTimeout:20 handler:^(NSError *error) { | 224 [self waitForExpectationsWithTimeout:20 handler:^(NSError *error) { |
222 if (error) { | 225 if (error) { |
223 XCTFail(@"Expectation failed with error %@.", error); | 226 XCTFail(@"Expectation failed with error %@.", error); |
224 } | 227 } |
225 }]; | 228 }]; |
226 } | 229 } |
(...skipping 16 matching lines...) Expand all Loading... |
243 messages:[NSArray array] | 246 messages:[NSArray array] |
244 messageHandler:^(ARDSignalingMessage *message) {} | 247 messageHandler:^(ARDSignalingMessage *message) {} |
245 connectedHandler:^{} | 248 connectedHandler:^{} |
246 localVideoTrackHandler:^{ [localVideoTrackExpectation fulfill
]; }]; | 249 localVideoTrackHandler:^{ [localVideoTrackExpectation fulfill
]; }]; |
247 caller.defaultPeerConnectionConstraints = | 250 caller.defaultPeerConnectionConstraints = |
248 [[RTCMediaConstraints alloc] initWithMandatoryConstraints:nil | 251 [[RTCMediaConstraints alloc] initWithMandatoryConstraints:nil |
249 optionalConstraints:nil]; | 252 optionalConstraints:nil]; |
250 | 253 |
251 // Kick off connection. | 254 // Kick off connection. |
252 [caller connectToRoomWithId:roomId | 255 [caller connectToRoomWithId:roomId |
| 256 settings:[[ARDSettingsModel alloc] init] |
253 isLoopback:NO | 257 isLoopback:NO |
254 isAudioOnly:NO | 258 isAudioOnly:NO |
255 shouldMakeAecDump:NO | 259 shouldMakeAecDump:NO |
256 shouldUseLevelControl:NO]; | 260 shouldUseLevelControl:NO]; |
257 [self waitForExpectationsWithTimeout:20 handler:^(NSError *error) { | 261 [self waitForExpectationsWithTimeout:20 handler:^(NSError *error) { |
258 if (error) { | 262 if (error) { |
259 XCTFail("Expectation timed out with error: %@.", error); | 263 XCTFail("Expectation timed out with error: %@.", error); |
260 } | 264 } |
261 }]; | 265 }]; |
262 } | 266 } |
263 #endif | 267 #endif |
264 | 268 |
265 @end | 269 @end |
OLD | NEW |