OLD | NEW |
1 /* | 1 /* |
2 * libjingle | 2 * libjingle |
3 * Copyright 2013 Google Inc. | 3 * Copyright 2013 Google Inc. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 sdpObserver = [[RTCSessionDescriptionSyncObserver alloc] init]; | 175 sdpObserver = [[RTCSessionDescriptionSyncObserver alloc] init]; |
176 [pcAnswer createAnswerWithDelegate:sdpObserver constraints:constraints]; | 176 [pcAnswer createAnswerWithDelegate:sdpObserver constraints:constraints]; |
177 [sdpObserver wait]; | 177 [sdpObserver wait]; |
178 EXPECT_TRUE(sdpObserver.success); | 178 EXPECT_TRUE(sdpObserver.success); |
179 RTCSessionDescription* answerSDP = sdpObserver.sessionDescription; | 179 RTCSessionDescription* answerSDP = sdpObserver.sessionDescription; |
180 EXPECT_EQ([@"answer" compare:answerSDP.type options:NSCaseInsensitiveSearch], | 180 EXPECT_EQ([@"answer" compare:answerSDP.type options:NSCaseInsensitiveSearch], |
181 NSOrderedSame); | 181 NSOrderedSame); |
182 EXPECT_GT([answerSDP.description length], 0); | 182 EXPECT_GT([answerSDP.description length], 0); |
183 | 183 |
184 [offeringExpectations expectICECandidates:2]; | 184 [offeringExpectations expectICECandidates:2]; |
185 // It's possible to only have 1 ICE candidate for the answerer, since we use | 185 [answeringExpectations expectICECandidates:2]; |
186 // BUNDLE and rtcp-mux by default, and don't provide any ICE servers in this | |
187 // test. | |
188 [answeringExpectations expectICECandidates:1]; | |
189 | 186 |
190 sdpObserver = [[RTCSessionDescriptionSyncObserver alloc] init]; | 187 sdpObserver = [[RTCSessionDescriptionSyncObserver alloc] init]; |
191 [answeringExpectations expectSignalingChange:RTCSignalingStable]; | 188 [answeringExpectations expectSignalingChange:RTCSignalingStable]; |
192 [pcAnswer setLocalDescriptionWithDelegate:sdpObserver | 189 [pcAnswer setLocalDescriptionWithDelegate:sdpObserver |
193 sessionDescription:answerSDP]; | 190 sessionDescription:answerSDP]; |
194 [sdpObserver wait]; | 191 [sdpObserver wait]; |
195 EXPECT_TRUE(sdpObserver.sessionDescription == NULL); | 192 EXPECT_TRUE(sdpObserver.sessionDescription == NULL); |
196 | 193 |
197 sdpObserver = [[RTCSessionDescriptionSyncObserver alloc] init]; | 194 sdpObserver = [[RTCSessionDescriptionSyncObserver alloc] init]; |
198 [offeringExpectations expectSignalingChange:RTCSignalingHaveLocalOffer]; | 195 [offeringExpectations expectSignalingChange:RTCSignalingHaveLocalOffer]; |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
319 // factory outlives RTCPeerConnection:dealloc. | 316 // factory outlives RTCPeerConnection:dealloc. |
320 // See https://code.google.com/p/webrtc/issues/detail?id=3100. | 317 // See https://code.google.com/p/webrtc/issues/detail?id=3100. |
321 RTCPeerConnectionFactory* factory = [[RTCPeerConnectionFactory alloc] init]; | 318 RTCPeerConnectionFactory* factory = [[RTCPeerConnectionFactory alloc] init]; |
322 @autoreleasepool { | 319 @autoreleasepool { |
323 RTCPeerConnectionTest* pcTest = [[RTCPeerConnectionTest alloc] init]; | 320 RTCPeerConnectionTest* pcTest = [[RTCPeerConnectionTest alloc] init]; |
324 [pcTest testCompleteSessionWithFactory:factory]; | 321 [pcTest testCompleteSessionWithFactory:factory]; |
325 } | 322 } |
326 rtc::CleanupSSL(); | 323 rtc::CleanupSSL(); |
327 } | 324 } |
328 } | 325 } |
OLD | NEW |