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

Side by Side Diff: webrtc/p2p/base/transport_unittest.cc

Issue 1353713002: Remove GICE (again). (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Undo .gclient Created 5 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/p2p/base/transport.cc ('k') | webrtc/p2p/base/transportchannelimpl.h » ('j') | 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 2011 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2011 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 thread_->ProcessMessages(0); 100 thread_->ProcessMessages(0);
101 EXPECT_FALSE(connecting_signalled_); 101 EXPECT_FALSE(connecting_signalled_);
102 } 102 }
103 103
104 // This test verifies channels are created with proper ICE 104 // This test verifies channels are created with proper ICE
105 // role, tiebreaker and remote ice mode and credentials after offer and 105 // role, tiebreaker and remote ice mode and credentials after offer and
106 // answer negotiations. 106 // answer negotiations.
107 TEST_F(TransportTest, TestChannelIceParameters) { 107 TEST_F(TransportTest, TestChannelIceParameters) {
108 transport_->SetIceRole(cricket::ICEROLE_CONTROLLING); 108 transport_->SetIceRole(cricket::ICEROLE_CONTROLLING);
109 transport_->SetIceTiebreaker(99U); 109 transport_->SetIceTiebreaker(99U);
110 cricket::TransportDescription local_desc( 110 cricket::TransportDescription local_desc(kIceUfrag1, kIcePwd1);
111 cricket::NS_JINGLE_ICE_UDP, kIceUfrag1, kIcePwd1);
112 ASSERT_TRUE(transport_->SetLocalTransportDescription(local_desc, 111 ASSERT_TRUE(transport_->SetLocalTransportDescription(local_desc,
113 cricket::CA_OFFER, 112 cricket::CA_OFFER,
114 NULL)); 113 NULL));
115 EXPECT_EQ(cricket::ICEROLE_CONTROLLING, transport_->ice_role()); 114 EXPECT_EQ(cricket::ICEROLE_CONTROLLING, transport_->ice_role());
116 EXPECT_TRUE(SetupChannel()); 115 EXPECT_TRUE(SetupChannel());
117 EXPECT_EQ(cricket::ICEROLE_CONTROLLING, channel_->GetIceRole()); 116 EXPECT_EQ(cricket::ICEROLE_CONTROLLING, channel_->GetIceRole());
118 EXPECT_EQ(cricket::ICEMODE_FULL, channel_->remote_ice_mode()); 117 EXPECT_EQ(cricket::ICEMODE_FULL, channel_->remote_ice_mode());
119 EXPECT_EQ(kIceUfrag1, channel_->ice_ufrag()); 118 EXPECT_EQ(kIceUfrag1, channel_->ice_ufrag());
120 EXPECT_EQ(kIcePwd1, channel_->ice_pwd()); 119 EXPECT_EQ(kIcePwd1, channel_->ice_pwd());
121 120
122 cricket::TransportDescription remote_desc( 121 cricket::TransportDescription remote_desc(kIceUfrag1, kIcePwd1);
123 cricket::NS_JINGLE_ICE_UDP, kIceUfrag1, kIcePwd1);
124 ASSERT_TRUE(transport_->SetRemoteTransportDescription(remote_desc, 122 ASSERT_TRUE(transport_->SetRemoteTransportDescription(remote_desc,
125 cricket::CA_ANSWER, 123 cricket::CA_ANSWER,
126 NULL)); 124 NULL));
127 EXPECT_EQ(cricket::ICEROLE_CONTROLLING, channel_->GetIceRole()); 125 EXPECT_EQ(cricket::ICEROLE_CONTROLLING, channel_->GetIceRole());
128 EXPECT_EQ(99U, channel_->IceTiebreaker()); 126 EXPECT_EQ(99U, channel_->IceTiebreaker());
129 EXPECT_EQ(cricket::ICEMODE_FULL, channel_->remote_ice_mode()); 127 EXPECT_EQ(cricket::ICEMODE_FULL, channel_->remote_ice_mode());
130 // Changing the transport role from CONTROLLING to CONTROLLED. 128 // Changing the transport role from CONTROLLING to CONTROLLED.
131 transport_->SetIceRole(cricket::ICEROLE_CONTROLLED); 129 transport_->SetIceRole(cricket::ICEROLE_CONTROLLED);
132 EXPECT_EQ(cricket::ICEROLE_CONTROLLED, channel_->GetIceRole()); 130 EXPECT_EQ(cricket::ICEROLE_CONTROLLED, channel_->GetIceRole());
133 EXPECT_EQ(cricket::ICEMODE_FULL, channel_->remote_ice_mode()); 131 EXPECT_EQ(cricket::ICEMODE_FULL, channel_->remote_ice_mode());
134 EXPECT_EQ(kIceUfrag1, channel_->remote_ice_ufrag()); 132 EXPECT_EQ(kIceUfrag1, channel_->remote_ice_ufrag());
135 EXPECT_EQ(kIcePwd1, channel_->remote_ice_pwd()); 133 EXPECT_EQ(kIcePwd1, channel_->remote_ice_pwd());
136 } 134 }
137 135
138 // Verifies that IceCredentialsChanged returns true when either ufrag or pwd 136 // Verifies that IceCredentialsChanged returns true when either ufrag or pwd
139 // changed, and false in other cases. 137 // changed, and false in other cases.
140 TEST_F(TransportTest, TestIceCredentialsChanged) { 138 TEST_F(TransportTest, TestIceCredentialsChanged) {
141 EXPECT_TRUE(cricket::IceCredentialsChanged("u1", "p1", "u2", "p2")); 139 EXPECT_TRUE(cricket::IceCredentialsChanged("u1", "p1", "u2", "p2"));
142 EXPECT_TRUE(cricket::IceCredentialsChanged("u1", "p1", "u2", "p1")); 140 EXPECT_TRUE(cricket::IceCredentialsChanged("u1", "p1", "u2", "p1"));
143 EXPECT_TRUE(cricket::IceCredentialsChanged("u1", "p1", "u1", "p2")); 141 EXPECT_TRUE(cricket::IceCredentialsChanged("u1", "p1", "u1", "p2"));
144 EXPECT_FALSE(cricket::IceCredentialsChanged("u1", "p1", "u1", "p1")); 142 EXPECT_FALSE(cricket::IceCredentialsChanged("u1", "p1", "u1", "p1"));
145 } 143 }
146 144
147 // This test verifies that the callee's ICE role changes from controlled to 145 // This test verifies that the callee's ICE role changes from controlled to
148 // controlling when the callee triggers an ICE restart. 146 // controlling when the callee triggers an ICE restart.
149 TEST_F(TransportTest, TestIceControlledToControllingOnIceRestart) { 147 TEST_F(TransportTest, TestIceControlledToControllingOnIceRestart) {
150 EXPECT_TRUE(SetupChannel()); 148 EXPECT_TRUE(SetupChannel());
151 transport_->SetIceRole(cricket::ICEROLE_CONTROLLED); 149 transport_->SetIceRole(cricket::ICEROLE_CONTROLLED);
152 150
153 cricket::TransportDescription desc( 151 cricket::TransportDescription desc(kIceUfrag1, kIcePwd1);
154 cricket::NS_JINGLE_ICE_UDP, kIceUfrag1, kIcePwd1);
155 ASSERT_TRUE(transport_->SetRemoteTransportDescription(desc, 152 ASSERT_TRUE(transport_->SetRemoteTransportDescription(desc,
156 cricket::CA_OFFER, 153 cricket::CA_OFFER,
157 NULL)); 154 NULL));
158 ASSERT_TRUE(transport_->SetLocalTransportDescription(desc, 155 ASSERT_TRUE(transport_->SetLocalTransportDescription(desc,
159 cricket::CA_ANSWER, 156 cricket::CA_ANSWER,
160 NULL)); 157 NULL));
161 EXPECT_EQ(cricket::ICEROLE_CONTROLLED, transport_->ice_role()); 158 EXPECT_EQ(cricket::ICEROLE_CONTROLLED, transport_->ice_role());
162 159
163 cricket::TransportDescription new_local_desc( 160 cricket::TransportDescription new_local_desc(kIceUfrag2, kIcePwd2);
164 cricket::NS_JINGLE_ICE_UDP, kIceUfrag2, kIcePwd2);
165 ASSERT_TRUE(transport_->SetLocalTransportDescription(new_local_desc, 161 ASSERT_TRUE(transport_->SetLocalTransportDescription(new_local_desc,
166 cricket::CA_OFFER, 162 cricket::CA_OFFER,
167 NULL)); 163 NULL));
168 EXPECT_EQ(cricket::ICEROLE_CONTROLLING, transport_->ice_role()); 164 EXPECT_EQ(cricket::ICEROLE_CONTROLLING, transport_->ice_role());
169 EXPECT_EQ(cricket::ICEROLE_CONTROLLING, channel_->GetIceRole()); 165 EXPECT_EQ(cricket::ICEROLE_CONTROLLING, channel_->GetIceRole());
170 } 166 }
171 167
172 // This test verifies that the caller's ICE role changes from controlling to 168 // This test verifies that the caller's ICE role changes from controlling to
173 // controlled when the callee triggers an ICE restart. 169 // controlled when the callee triggers an ICE restart.
174 TEST_F(TransportTest, TestIceControllingToControlledOnIceRestart) { 170 TEST_F(TransportTest, TestIceControllingToControlledOnIceRestart) {
175 EXPECT_TRUE(SetupChannel()); 171 EXPECT_TRUE(SetupChannel());
176 transport_->SetIceRole(cricket::ICEROLE_CONTROLLING); 172 transport_->SetIceRole(cricket::ICEROLE_CONTROLLING);
177 173
178 cricket::TransportDescription desc( 174 cricket::TransportDescription desc(kIceUfrag1, kIcePwd1);
179 cricket::NS_JINGLE_ICE_UDP, kIceUfrag1, kIcePwd1);
180 ASSERT_TRUE(transport_->SetLocalTransportDescription(desc, 175 ASSERT_TRUE(transport_->SetLocalTransportDescription(desc,
181 cricket::CA_OFFER, 176 cricket::CA_OFFER,
182 NULL)); 177 NULL));
183 ASSERT_TRUE(transport_->SetRemoteTransportDescription(desc, 178 ASSERT_TRUE(transport_->SetRemoteTransportDescription(desc,
184 cricket::CA_ANSWER, 179 cricket::CA_ANSWER,
185 NULL)); 180 NULL));
186 EXPECT_EQ(cricket::ICEROLE_CONTROLLING, transport_->ice_role()); 181 EXPECT_EQ(cricket::ICEROLE_CONTROLLING, transport_->ice_role());
187 182
188 cricket::TransportDescription new_local_desc( 183 cricket::TransportDescription new_local_desc(kIceUfrag2, kIcePwd2);
189 cricket::NS_JINGLE_ICE_UDP, kIceUfrag2, kIcePwd2);
190 ASSERT_TRUE(transport_->SetLocalTransportDescription(new_local_desc, 184 ASSERT_TRUE(transport_->SetLocalTransportDescription(new_local_desc,
191 cricket::CA_ANSWER, 185 cricket::CA_ANSWER,
192 NULL)); 186 NULL));
193 EXPECT_EQ(cricket::ICEROLE_CONTROLLED, transport_->ice_role()); 187 EXPECT_EQ(cricket::ICEROLE_CONTROLLED, transport_->ice_role());
194 EXPECT_EQ(cricket::ICEROLE_CONTROLLED, channel_->GetIceRole()); 188 EXPECT_EQ(cricket::ICEROLE_CONTROLLED, channel_->GetIceRole());
195 } 189 }
196 190
197 // This test verifies that the caller's ICE role is still controlling after the 191 // This test verifies that the caller's ICE role is still controlling after the
198 // callee triggers ICE restart if the callee's ICE mode is LITE. 192 // callee triggers ICE restart if the callee's ICE mode is LITE.
199 TEST_F(TransportTest, TestIceControllingOnIceRestartIfRemoteIsIceLite) { 193 TEST_F(TransportTest, TestIceControllingOnIceRestartIfRemoteIsIceLite) {
200 EXPECT_TRUE(SetupChannel()); 194 EXPECT_TRUE(SetupChannel());
201 transport_->SetIceRole(cricket::ICEROLE_CONTROLLING); 195 transport_->SetIceRole(cricket::ICEROLE_CONTROLLING);
202 196
203 cricket::TransportDescription desc( 197 cricket::TransportDescription desc(kIceUfrag1, kIcePwd1);
204 cricket::NS_JINGLE_ICE_UDP, kIceUfrag1, kIcePwd1);
205 ASSERT_TRUE(transport_->SetLocalTransportDescription(desc, 198 ASSERT_TRUE(transport_->SetLocalTransportDescription(desc,
206 cricket::CA_OFFER, 199 cricket::CA_OFFER,
207 NULL)); 200 NULL));
208 201
209 cricket::TransportDescription remote_desc( 202 cricket::TransportDescription remote_desc(
210 cricket::NS_JINGLE_ICE_UDP, std::vector<std::string>(), 203 std::vector<std::string>(),
211 kIceUfrag1, kIcePwd1, cricket::ICEMODE_LITE, 204 kIceUfrag1, kIcePwd1, cricket::ICEMODE_LITE,
212 cricket::CONNECTIONROLE_NONE, NULL, cricket::Candidates()); 205 cricket::CONNECTIONROLE_NONE, NULL, cricket::Candidates());
213 ASSERT_TRUE(transport_->SetRemoteTransportDescription(remote_desc, 206 ASSERT_TRUE(transport_->SetRemoteTransportDescription(remote_desc,
214 cricket::CA_ANSWER, 207 cricket::CA_ANSWER,
215 NULL)); 208 NULL));
216 209
217 EXPECT_EQ(cricket::ICEROLE_CONTROLLING, transport_->ice_role()); 210 EXPECT_EQ(cricket::ICEROLE_CONTROLLING, transport_->ice_role());
218 211
219 cricket::TransportDescription new_local_desc( 212 cricket::TransportDescription new_local_desc(kIceUfrag2, kIcePwd2);
220 cricket::NS_JINGLE_ICE_UDP, kIceUfrag2, kIcePwd2);
221 ASSERT_TRUE(transport_->SetLocalTransportDescription(new_local_desc, 213 ASSERT_TRUE(transport_->SetLocalTransportDescription(new_local_desc,
222 cricket::CA_ANSWER, 214 cricket::CA_ANSWER,
223 NULL)); 215 NULL));
224 EXPECT_EQ(cricket::ICEROLE_CONTROLLING, transport_->ice_role()); 216 EXPECT_EQ(cricket::ICEROLE_CONTROLLING, transport_->ice_role());
225 EXPECT_EQ(cricket::ICEROLE_CONTROLLING, channel_->GetIceRole()); 217 EXPECT_EQ(cricket::ICEROLE_CONTROLLING, channel_->GetIceRole());
226 } 218 }
227 219
228 // This test verifies that the Completed and Failed states can be reached. 220 // This test verifies that the Completed and Failed states can be reached.
229 TEST_F(TransportTest, TestChannelCompletedAndFailed) { 221 TEST_F(TransportTest, TestChannelCompletedAndFailed) {
230 transport_->SetIceRole(cricket::ICEROLE_CONTROLLING); 222 transport_->SetIceRole(cricket::ICEROLE_CONTROLLING);
231 cricket::TransportDescription local_desc( 223 cricket::TransportDescription local_desc(kIceUfrag1, kIcePwd1);
232 cricket::NS_JINGLE_ICE_UDP, kIceUfrag1, kIcePwd1);
233 ASSERT_TRUE(transport_->SetLocalTransportDescription(local_desc, 224 ASSERT_TRUE(transport_->SetLocalTransportDescription(local_desc,
234 cricket::CA_OFFER, 225 cricket::CA_OFFER,
235 NULL)); 226 NULL));
236 EXPECT_TRUE(SetupChannel()); 227 EXPECT_TRUE(SetupChannel());
237 228
238 cricket::TransportDescription remote_desc( 229 cricket::TransportDescription remote_desc(kIceUfrag1, kIcePwd1);
239 cricket::NS_JINGLE_ICE_UDP, kIceUfrag1, kIcePwd1);
240 ASSERT_TRUE(transport_->SetRemoteTransportDescription(remote_desc, 230 ASSERT_TRUE(transport_->SetRemoteTransportDescription(remote_desc,
241 cricket::CA_ANSWER, 231 cricket::CA_ANSWER,
242 NULL)); 232 NULL));
243 233
244 channel_->SetConnectionCount(2); 234 channel_->SetConnectionCount(2);
245 channel_->SignalCandidatesAllocationDone(channel_); 235 channel_->SignalCandidatesAllocationDone(channel_);
246 channel_->SetWritable(true); 236 channel_->SetWritable(true);
247 EXPECT_TRUE_WAIT(transport_->all_channels_writable(), 100); 237 EXPECT_TRUE_WAIT(transport_->all_channels_writable(), 100);
248 // ICE is not yet completed because there is still more than one connection. 238 // ICE is not yet completed because there is still more than one connection.
249 EXPECT_FALSE(completed_); 239 EXPECT_FALSE(completed_);
250 EXPECT_FALSE(failed_); 240 EXPECT_FALSE(failed_);
251 241
252 // When the connection count drops to 1, SignalCompleted should be emitted, 242 // When the connection count drops to 1, SignalCompleted should be emitted,
253 // and completed() should be true. 243 // and completed() should be true.
254 channel_->SetConnectionCount(1); 244 channel_->SetConnectionCount(1);
255 EXPECT_TRUE_WAIT(completed_, 100); 245 EXPECT_TRUE_WAIT(completed_, 100);
256 completed_ = false; 246 completed_ = false;
257 247
258 // When the connection count drops to 0, SignalFailed should be emitted, and 248 // When the connection count drops to 0, SignalFailed should be emitted, and
259 // completed() should be false. 249 // completed() should be false.
260 channel_->SetConnectionCount(0); 250 channel_->SetConnectionCount(0);
261 EXPECT_TRUE_WAIT(failed_, 100); 251 EXPECT_TRUE_WAIT(failed_, 100);
262 EXPECT_FALSE(completed_); 252 EXPECT_FALSE(completed_);
263 } 253 }
264 254
265 // Tests channel role is reversed after receiving ice-lite from remote. 255 // Tests channel role is reversed after receiving ice-lite from remote.
266 TEST_F(TransportTest, TestSetRemoteIceLiteInOffer) { 256 TEST_F(TransportTest, TestSetRemoteIceLiteInOffer) {
267 transport_->SetIceRole(cricket::ICEROLE_CONTROLLED); 257 transport_->SetIceRole(cricket::ICEROLE_CONTROLLED);
268 cricket::TransportDescription remote_desc( 258 cricket::TransportDescription remote_desc(
269 cricket::NS_JINGLE_ICE_UDP, std::vector<std::string>(), 259 std::vector<std::string>(),
270 kIceUfrag1, kIcePwd1, cricket::ICEMODE_LITE, 260 kIceUfrag1, kIcePwd1, cricket::ICEMODE_LITE,
271 cricket::CONNECTIONROLE_ACTPASS, NULL, cricket::Candidates()); 261 cricket::CONNECTIONROLE_ACTPASS, NULL, cricket::Candidates());
272 ASSERT_TRUE(transport_->SetRemoteTransportDescription(remote_desc, 262 ASSERT_TRUE(transport_->SetRemoteTransportDescription(remote_desc,
273 cricket::CA_OFFER, 263 cricket::CA_OFFER,
274 NULL)); 264 NULL));
275 cricket::TransportDescription local_desc( 265 cricket::TransportDescription local_desc(kIceUfrag1, kIcePwd1);
276 cricket::NS_JINGLE_ICE_UDP, kIceUfrag1, kIcePwd1);
277 ASSERT_TRUE(transport_->SetLocalTransportDescription(local_desc, 266 ASSERT_TRUE(transport_->SetLocalTransportDescription(local_desc,
278 cricket::CA_ANSWER, 267 cricket::CA_ANSWER,
279 NULL)); 268 NULL));
280 EXPECT_EQ(cricket::ICEROLE_CONTROLLING, transport_->ice_role()); 269 EXPECT_EQ(cricket::ICEROLE_CONTROLLING, transport_->ice_role());
281 EXPECT_TRUE(SetupChannel()); 270 EXPECT_TRUE(SetupChannel());
282 EXPECT_EQ(cricket::ICEROLE_CONTROLLING, channel_->GetIceRole()); 271 EXPECT_EQ(cricket::ICEROLE_CONTROLLING, channel_->GetIceRole());
283 EXPECT_EQ(cricket::ICEMODE_LITE, channel_->remote_ice_mode()); 272 EXPECT_EQ(cricket::ICEMODE_LITE, channel_->remote_ice_mode());
284 } 273 }
285 274
286 // Tests ice-lite in remote answer. 275 // Tests ice-lite in remote answer.
287 TEST_F(TransportTest, TestSetRemoteIceLiteInAnswer) { 276 TEST_F(TransportTest, TestSetRemoteIceLiteInAnswer) {
288 transport_->SetIceRole(cricket::ICEROLE_CONTROLLING); 277 transport_->SetIceRole(cricket::ICEROLE_CONTROLLING);
289 cricket::TransportDescription local_desc( 278 cricket::TransportDescription local_desc(kIceUfrag1, kIcePwd1);
290 cricket::NS_JINGLE_ICE_UDP, kIceUfrag1, kIcePwd1);
291 ASSERT_TRUE(transport_->SetLocalTransportDescription(local_desc, 279 ASSERT_TRUE(transport_->SetLocalTransportDescription(local_desc,
292 cricket::CA_OFFER, 280 cricket::CA_OFFER,
293 NULL)); 281 NULL));
294 EXPECT_EQ(cricket::ICEROLE_CONTROLLING, transport_->ice_role()); 282 EXPECT_EQ(cricket::ICEROLE_CONTROLLING, transport_->ice_role());
295 EXPECT_TRUE(SetupChannel()); 283 EXPECT_TRUE(SetupChannel());
296 EXPECT_EQ(cricket::ICEROLE_CONTROLLING, channel_->GetIceRole()); 284 EXPECT_EQ(cricket::ICEROLE_CONTROLLING, channel_->GetIceRole());
297 // Channels will be created in ICEFULL_MODE. 285 // Channels will be created in ICEFULL_MODE.
298 EXPECT_EQ(cricket::ICEMODE_FULL, channel_->remote_ice_mode()); 286 EXPECT_EQ(cricket::ICEMODE_FULL, channel_->remote_ice_mode());
299 cricket::TransportDescription remote_desc( 287 cricket::TransportDescription remote_desc(
300 cricket::NS_JINGLE_ICE_UDP, std::vector<std::string>(), 288 std::vector<std::string>(),
301 kIceUfrag1, kIcePwd1, cricket::ICEMODE_LITE, 289 kIceUfrag1, kIcePwd1, cricket::ICEMODE_LITE,
302 cricket::CONNECTIONROLE_NONE, NULL, cricket::Candidates()); 290 cricket::CONNECTIONROLE_NONE, NULL, cricket::Candidates());
303 ASSERT_TRUE(transport_->SetRemoteTransportDescription(remote_desc, 291 ASSERT_TRUE(transport_->SetRemoteTransportDescription(remote_desc,
304 cricket::CA_ANSWER, 292 cricket::CA_ANSWER,
305 NULL)); 293 NULL));
306 EXPECT_EQ(cricket::ICEROLE_CONTROLLING, channel_->GetIceRole()); 294 EXPECT_EQ(cricket::ICEROLE_CONTROLLING, channel_->GetIceRole());
307 // After receiving remote description with ICEMODE_LITE, channel should 295 // After receiving remote description with ICEMODE_LITE, channel should
308 // have mode set to ICEMODE_LITE. 296 // have mode set to ICEMODE_LITE.
309 EXPECT_EQ(cricket::ICEMODE_LITE, channel_->remote_ice_mode()); 297 EXPECT_EQ(cricket::ICEMODE_LITE, channel_->remote_ice_mode());
310 } 298 }
(...skipping 24 matching lines...) Expand all
335 EXPECT_TRUE_WAIT(transport_->any_channel_receiving(), 100); 323 EXPECT_TRUE_WAIT(transport_->any_channel_receiving(), 100);
336 324
337 channel2->SetReceiving(false); 325 channel2->SetReceiving(false);
338 EXPECT_TRUE_WAIT(transport_->any_channel_receiving(), 100); 326 EXPECT_TRUE_WAIT(transport_->any_channel_receiving(), 100);
339 327
340 // After both channels become not receiving, the transport receiving state 328 // After both channels become not receiving, the transport receiving state
341 // becomes TRANSPORT_STATE_NONE. 329 // becomes TRANSPORT_STATE_NONE.
342 channel_->SetReceiving(false); 330 channel_->SetReceiving(false);
343 EXPECT_TRUE_WAIT(!transport_->any_channel_receiving(), 100); 331 EXPECT_TRUE_WAIT(!transport_->any_channel_receiving(), 100);
344 } 332 }
OLDNEW
« no previous file with comments | « webrtc/p2p/base/transport.cc ('k') | webrtc/p2p/base/transportchannelimpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698