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

Side by Side Diff: content/browser/media/webrtc_browsertest.cc

Issue 117843002: Enable some webrtc content_browsertests on Android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: reload Created 7 years 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/debug/trace_event_impl.h" 6 #include "base/debug/trace_event_impl.h"
7 #include "base/json/json_reader.h" 7 #include "base/json/json_reader.h"
8 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 #endif 192 #endif
193 193
194 // These tests will make a complete PeerConnection-based call and verify that 194 // These tests will make a complete PeerConnection-based call and verify that
195 // video is playing for the call. 195 // video is playing for the call.
196 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, MAYBE_CanSetupVideoCall) { 196 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, MAYBE_CanSetupVideoCall) {
197 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); 197 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady());
198 198
199 GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html")); 199 GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html"));
200 NavigateToURL(shell(), url); 200 NavigateToURL(shell(), url);
201 201
202 EXPECT_TRUE(ExecuteJavascript(
203 base::StringPrintf("setForceIsac16K(%s);", kForceIsac16K)));
202 EXPECT_TRUE(ExecuteJavascript("call({video: true});")); 204 EXPECT_TRUE(ExecuteJavascript("call({video: true});"));
203 ExpectTitle("OK"); 205 ExpectTitle("OK");
204 } 206 }
205 207
206 // This test will make a simple getUserMedia page, verify that video is playing 208 // This test will make a simple getUserMedia page, verify that video is playing
207 // in a simple local <video>, and for a couple of seconds, collect some 209 // in a simple local <video>, and for a couple of seconds, collect some
208 // performance traces. 210 // performance traces.
209 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, TracePerformanceDuringGetUserMedia) { 211 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, TracePerformanceDuringGetUserMedia) {
210 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); 212 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady());
211 213
(...skipping 27 matching lines...) Expand all
239 #else 241 #else
240 #define MAYBE_CanSetupAudioAndVideoCall CanSetupAudioAndVideoCall 242 #define MAYBE_CanSetupAudioAndVideoCall CanSetupAudioAndVideoCall
241 #endif 243 #endif
242 244
243 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, MAYBE_CanSetupAudioAndVideoCall) { 245 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, MAYBE_CanSetupAudioAndVideoCall) {
244 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); 246 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady());
245 247
246 GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html")); 248 GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html"));
247 NavigateToURL(shell(), url); 249 NavigateToURL(shell(), url);
248 250
251 EXPECT_TRUE(ExecuteJavascript(
252 base::StringPrintf("setForceIsac16K(%s);", kForceIsac16K)));
249 EXPECT_TRUE(ExecuteJavascript("call({video: true, audio: true});")); 253 EXPECT_TRUE(ExecuteJavascript("call({video: true, audio: true});"));
250 ExpectTitle("OK"); 254 ExpectTitle("OK");
251 } 255 }
252 256
253 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, MANUAL_CanSetupCallAndSendDtmf) { 257 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, MANUAL_CanSetupCallAndSendDtmf) {
254 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); 258 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady());
255 259
256 GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html")); 260 GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html"));
257 NavigateToURL(shell(), url); 261 NavigateToURL(shell(), url);
258 262
263 EXPECT_TRUE(ExecuteJavascript(
264 base::StringPrintf("setForceIsac16K(%s);", kForceIsac16K)));
259 EXPECT_TRUE( 265 EXPECT_TRUE(
260 ExecuteJavascript("callAndSendDtmf('123,abc');")); 266 ExecuteJavascript("callAndSendDtmf('123,abc');"));
261 } 267 }
262 268
263 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, 269 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest,
264 DISABLED_CanMakeEmptyCallThenAddStreamsAndRenegotiate) { 270 DISABLED_CanMakeEmptyCallThenAddStreamsAndRenegotiate) {
265 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); 271 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady());
266 272
267 GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html")); 273 GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html"));
268 NavigateToURL(shell(), url); 274 NavigateToURL(shell(), url);
(...skipping 15 matching lines...) Expand all
284 #define MAYBE_CanForwardRemoteStream CanForwardRemoteStream 290 #define MAYBE_CanForwardRemoteStream CanForwardRemoteStream
285 #define MAYBE_CanForwardRemoteStream720p CanForwardRemoteStream720p 291 #define MAYBE_CanForwardRemoteStream720p CanForwardRemoteStream720p
286 #endif 292 #endif
287 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, MAYBE_CanForwardRemoteStream) { 293 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, MAYBE_CanForwardRemoteStream) {
288 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); 294 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady());
289 295
290 GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html")); 296 GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html"));
291 NavigateToURL(shell(), url); 297 NavigateToURL(shell(), url);
292 298
293 EXPECT_TRUE(ExecuteJavascript( 299 EXPECT_TRUE(ExecuteJavascript(
300 base::StringPrintf("setForceIsac16K(%s);", kForceIsac16K)));
301 EXPECT_TRUE(ExecuteJavascript(
294 "callAndForwardRemoteStream({video: true, audio: true});")); 302 "callAndForwardRemoteStream({video: true, audio: true});"));
295 ExpectTitle("OK"); 303 ExpectTitle("OK");
296 } 304 }
297 305
298 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, MAYBE_CanForwardRemoteStream720p) { 306 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, MAYBE_CanForwardRemoteStream720p) {
299 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); 307 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady());
300 308
301 GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html")); 309 GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html"));
302 NavigateToURL(shell(), url); 310 NavigateToURL(shell(), url);
303 311
312 EXPECT_TRUE(ExecuteJavascript(
313 base::StringPrintf("setForceIsac16K(%s);", kForceIsac16K)));
304 const std::string cmd = GenerateGetUserMediaCall("callAndForwardRemoteStream", 314 const std::string cmd = GenerateGetUserMediaCall("callAndForwardRemoteStream",
305 1280, 1280, 315 1280, 1280,
306 720, 720, 30, 30); 316 720, 720, 30, 30);
307 EXPECT_TRUE(ExecuteJavascript(cmd)); 317 EXPECT_TRUE(ExecuteJavascript(cmd));
308 ExpectTitle("OK"); 318 ExpectTitle("OK");
309 } 319 }
310 320
311 // This test will make a complete PeerConnection-based call but remove the 321 // This test will make a complete PeerConnection-based call but remove the
312 // MSID and bundle attribute from the initial offer to verify that 322 // MSID and bundle attribute from the initial offer to verify that
313 // video is playing for the call even if the initiating client don't support 323 // video is playing for the call even if the initiating client don't support
(...skipping 10 matching lines...) Expand all
324 #define MAYBE_CanSetupAudioAndVideoCallWithoutMsidAndBundle\ 334 #define MAYBE_CanSetupAudioAndVideoCallWithoutMsidAndBundle\
325 CanSetupAudioAndVideoCallWithoutMsidAndBundle 335 CanSetupAudioAndVideoCallWithoutMsidAndBundle
326 #endif 336 #endif
327 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, 337 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest,
328 MAYBE_CanSetupAudioAndVideoCallWithoutMsidAndBundle) { 338 MAYBE_CanSetupAudioAndVideoCallWithoutMsidAndBundle) {
329 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); 339 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady());
330 340
331 GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html")); 341 GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html"));
332 NavigateToURL(shell(), url); 342 NavigateToURL(shell(), url);
333 343
344 EXPECT_TRUE(ExecuteJavascript(
345 base::StringPrintf("setForceIsac16K(%s);", kForceIsac16K)));
334 EXPECT_TRUE(ExecuteJavascript("callWithoutMsidAndBundle();")); 346 EXPECT_TRUE(ExecuteJavascript("callWithoutMsidAndBundle();"));
335 ExpectTitle("OK"); 347 ExpectTitle("OK");
336 } 348 }
337 349
338 // This test will modify the SDP offer to an unsupported codec, which should 350 // This test will modify the SDP offer to an unsupported codec, which should
339 // cause SetLocalDescription to fail. 351 // cause SetLocalDescription to fail.
340 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, 352 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest,
341 NegotiateUnsupportedVideoCodec) { 353 NegotiateUnsupportedVideoCodec) {
342 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); 354 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady());
343 355
344 GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html")); 356 GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html"));
345 NavigateToURL(shell(), url); 357 NavigateToURL(shell(), url);
346 358
359 EXPECT_TRUE(ExecuteJavascript(
360 base::StringPrintf("setForceIsac16K(%s);", kForceIsac16K)));
347 EXPECT_TRUE(ExecuteJavascript("negotiateUnsupportedVideoCodec();")); 361 EXPECT_TRUE(ExecuteJavascript("negotiateUnsupportedVideoCodec();"));
348 ExpectTitle("OK"); 362 ExpectTitle("OK");
349 } 363 }
350 364
351 // This test will modify the SDP offer to use no encryption, which should 365 // This test will modify the SDP offer to use no encryption, which should
352 // cause SetLocalDescription to fail. 366 // cause SetLocalDescription to fail.
353 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, NegotiateNonCryptoCall) { 367 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, NegotiateNonCryptoCall) {
354 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); 368 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady());
355 369
356 GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html")); 370 GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html"));
357 NavigateToURL(shell(), url); 371 NavigateToURL(shell(), url);
358 372
373 EXPECT_TRUE(ExecuteJavascript(
374 base::StringPrintf("setForceIsac16K(%s);", kForceIsac16K)));
359 EXPECT_TRUE(ExecuteJavascript("negotiateNonCryptoCall();")); 375 EXPECT_TRUE(ExecuteJavascript("negotiateNonCryptoCall();"));
360 ExpectTitle("OK"); 376 ExpectTitle("OK");
361 } 377 }
362 378
363 // This test will make a complete PeerConnection-based call using legacy SDP 379 // This test will make a complete PeerConnection-based call using legacy SDP
364 // settings: GIce, external SDES, and no BUNDLE. 380 // settings: GIce, external SDES, and no BUNDLE.
365 #if defined(OS_WIN) && defined(USE_AURA) 381 #if defined(OS_WIN) && defined(USE_AURA)
366 // Disabled for win7_aura, see http://crbug.com/235089. 382 // Disabled for win7_aura, see http://crbug.com/235089.
367 #define MAYBE_CanSetupLegacyCall DISABLED_CanSetupLegacyCall 383 #define MAYBE_CanSetupLegacyCall DISABLED_CanSetupLegacyCall
368 #elif defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(ARCH_CPU_ARM_FAMILY) 384 #elif defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(ARCH_CPU_ARM_FAMILY)
369 // Timing out on ARM linux, see http://crbug.com/240373 385 // Timing out on ARM linux, see http://crbug.com/240373
370 #define MAYBE_CanSetupLegacyCall DISABLED_CanSetupLegacyCall 386 #define MAYBE_CanSetupLegacyCall DISABLED_CanSetupLegacyCall
371 #else 387 #else
372 #define MAYBE_CanSetupLegacyCall CanSetupLegacyCall 388 #define MAYBE_CanSetupLegacyCall CanSetupLegacyCall
373 #endif 389 #endif
374 390
375 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, MAYBE_CanSetupLegacyCall) { 391 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, MAYBE_CanSetupLegacyCall) {
376 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); 392 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady());
377 393
378 GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html")); 394 GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html"));
379 NavigateToURL(shell(), url); 395 NavigateToURL(shell(), url);
380 396
397 EXPECT_TRUE(ExecuteJavascript(
398 base::StringPrintf("setForceIsac16K(%s);", kForceIsac16K)));
381 EXPECT_TRUE(ExecuteJavascript("callWithLegacySdp();")); 399 EXPECT_TRUE(ExecuteJavascript("callWithLegacySdp();"));
382 ExpectTitle("OK"); 400 ExpectTitle("OK");
383 } 401 }
384 402
385 // This test will make a PeerConnection-based call and test an unreliable text 403 // This test will make a PeerConnection-based call and test an unreliable text
386 // dataChannel. 404 // dataChannel.
387 // TODO(mallinath) - Remove this test after rtp based data channel is disabled. 405 // TODO(mallinath) - Remove this test after rtp based data channel is disabled.
388 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, CallWithDataOnly) { 406 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, CallWithDataOnly) {
389 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); 407 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady());
390 408
391 GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html")); 409 GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html"));
392 NavigateToURL(shell(), url); 410 NavigateToURL(shell(), url);
393 411
412 EXPECT_TRUE(ExecuteJavascript(
413 base::StringPrintf("setForceIsac16K(%s);", kForceIsac16K)));
394 EXPECT_TRUE(ExecuteJavascript("callWithDataOnly();")); 414 EXPECT_TRUE(ExecuteJavascript("callWithDataOnly();"));
395 ExpectTitle("OK"); 415 ExpectTitle("OK");
396 } 416 }
397 417
398 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, CallWithSctpDataOnly) { 418 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, CallWithSctpDataOnly) {
399 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); 419 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady());
400 420
401 GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html")); 421 GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html"));
402 NavigateToURL(shell(), url); 422 NavigateToURL(shell(), url);
403 423
424 EXPECT_TRUE(ExecuteJavascript(
425 base::StringPrintf("setForceIsac16K(%s);", kForceIsac16K)));
404 EXPECT_TRUE(ExecuteJavascript("callWithSctpDataOnly();")); 426 EXPECT_TRUE(ExecuteJavascript("callWithSctpDataOnly();"));
405 ExpectTitle("OK"); 427 ExpectTitle("OK");
406 } 428 }
407 429
408 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(ARCH_CPU_ARM_FAMILY) 430 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(ARCH_CPU_ARM_FAMILY)
409 // Timing out on ARM linux bot: http://crbug.com/238490 431 // Timing out on ARM linux bot: http://crbug.com/238490
410 #define MAYBE_CallWithDataAndMedia DISABLED_CallWithDataAndMedia 432 #define MAYBE_CallWithDataAndMedia DISABLED_CallWithDataAndMedia
411 #else 433 #else
412 #define MAYBE_CallWithDataAndMedia CallWithDataAndMedia 434 #define MAYBE_CallWithDataAndMedia CallWithDataAndMedia
413 #endif 435 #endif
414 436
415 // This test will make a PeerConnection-based call and test an unreliable text 437 // This test will make a PeerConnection-based call and test an unreliable text
416 // dataChannel and audio and video tracks. 438 // dataChannel and audio and video tracks.
417 // TODO(mallinath) - Remove this test after rtp based data channel is disabled. 439 // TODO(mallinath) - Remove this test after rtp based data channel is disabled.
418 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, MAYBE_CallWithDataAndMedia) { 440 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, MAYBE_CallWithDataAndMedia) {
419 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); 441 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady());
420 442
421 GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html")); 443 GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html"));
422 NavigateToURL(shell(), url); 444 NavigateToURL(shell(), url);
423 445
446 EXPECT_TRUE(ExecuteJavascript(
447 base::StringPrintf("setForceIsac16K(%s);", kForceIsac16K)));
424 EXPECT_TRUE(ExecuteJavascript("callWithDataAndMedia();")); 448 EXPECT_TRUE(ExecuteJavascript("callWithDataAndMedia();"));
425 ExpectTitle("OK"); 449 ExpectTitle("OK");
426 } 450 }
427 451
428 452
429 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(ARCH_CPU_ARM_FAMILY) 453 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(ARCH_CPU_ARM_FAMILY)
430 // Timing out on ARM linux bot: http://crbug.com/238490 454 // Timing out on ARM linux bot: http://crbug.com/238490
431 #define MAYBE_CallWithSctpDataAndMedia DISABLED_CallWithSctpDataAndMedia 455 #define MAYBE_CallWithSctpDataAndMedia DISABLED_CallWithSctpDataAndMedia
432 #else 456 #else
433 #define MAYBE_CallWithSctpDataAndMedia CallWithSctpDataAndMedia 457 #define MAYBE_CallWithSctpDataAndMedia CallWithSctpDataAndMedia
434 #endif 458 #endif
435 459
436 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, 460 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest,
437 MAYBE_CallWithSctpDataAndMedia) { 461 MAYBE_CallWithSctpDataAndMedia) {
438 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); 462 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady());
439 463
440 GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html")); 464 GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html"));
441 NavigateToURL(shell(), url); 465 NavigateToURL(shell(), url);
442 466
467 EXPECT_TRUE(ExecuteJavascript(
468 base::StringPrintf("setForceIsac16K(%s);", kForceIsac16K)));
443 EXPECT_TRUE(ExecuteJavascript("callWithSctpDataAndMedia();")); 469 EXPECT_TRUE(ExecuteJavascript("callWithSctpDataAndMedia();"));
444 ExpectTitle("OK"); 470 ExpectTitle("OK");
445 } 471 }
446 472
447 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(ARCH_CPU_ARM_FAMILY) 473 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(ARCH_CPU_ARM_FAMILY)
448 // Timing out on ARM linux bot: http://crbug.com/238490 474 // Timing out on ARM linux bot: http://crbug.com/238490
449 #define MAYBE_CallWithDataAndLaterAddMedia DISABLED_CallWithDataAndLaterAddMedia 475 #define MAYBE_CallWithDataAndLaterAddMedia DISABLED_CallWithDataAndLaterAddMedia
450 #else 476 #else
451 // Temporarily disable the test on all platforms. http://crbug.com/293252 477 // Temporarily disable the test on all platforms. http://crbug.com/293252
452 #define MAYBE_CallWithDataAndLaterAddMedia DISABLED_CallWithDataAndLaterAddMedia 478 #define MAYBE_CallWithDataAndLaterAddMedia DISABLED_CallWithDataAndLaterAddMedia
(...skipping 20 matching lines...) Expand all
473 499
474 // This test will make a PeerConnection-based call and send a new Video 500 // This test will make a PeerConnection-based call and send a new Video
475 // MediaStream that has been created based on a MediaStream created with 501 // MediaStream that has been created based on a MediaStream created with
476 // getUserMedia. 502 // getUserMedia.
477 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, MAYBE_CallWithNewVideoMediaStream) { 503 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, MAYBE_CallWithNewVideoMediaStream) {
478 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); 504 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady());
479 505
480 GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html")); 506 GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html"));
481 NavigateToURL(shell(), url); 507 NavigateToURL(shell(), url);
482 508
509 EXPECT_TRUE(ExecuteJavascript(
510 base::StringPrintf("setForceIsac16K(%s);", kForceIsac16K)));
483 EXPECT_TRUE(ExecuteJavascript("callWithNewVideoMediaStream();")); 511 EXPECT_TRUE(ExecuteJavascript("callWithNewVideoMediaStream();"));
484 ExpectTitle("OK"); 512 ExpectTitle("OK");
485 } 513 }
486 514
487 // This test will make a PeerConnection-based call and send a new Video 515 // This test will make a PeerConnection-based call and send a new Video
488 // MediaStream that has been created based on a MediaStream created with 516 // MediaStream that has been created based on a MediaStream created with
489 // getUserMedia. When video is flowing, the VideoTrack is removed and an 517 // getUserMedia. When video is flowing, the VideoTrack is removed and an
490 // AudioTrack is added instead. 518 // AudioTrack is added instead.
491 // TODO(phoglund): This test is manual since not all buildbots has an audio 519 // TODO(phoglund): This test is manual since not all buildbots has an audio
492 // input. 520 // input.
493 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, MANUAL_CallAndModifyStream) { 521 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, MANUAL_CallAndModifyStream) {
494 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); 522 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady());
495 523
496 GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html")); 524 GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html"));
497 NavigateToURL(shell(), url); 525 NavigateToURL(shell(), url);
498 526
527 EXPECT_TRUE(ExecuteJavascript(
528 base::StringPrintf("setForceIsac16K(%s);", kForceIsac16K)));
499 EXPECT_TRUE( 529 EXPECT_TRUE(
500 ExecuteJavascript("callWithNewVideoMediaStreamLaterSwitchToAudio();")); 530 ExecuteJavascript("callWithNewVideoMediaStreamLaterSwitchToAudio();"));
501 ExpectTitle("OK"); 531 ExpectTitle("OK");
502 } 532 }
503 533
504 // This test calls getUserMedia in sequence with different constraints. 534 // This test calls getUserMedia in sequence with different constraints.
505 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, TestGetUserMediaConstraints) { 535 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, TestGetUserMediaConstraints) {
506 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); 536 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady());
507 537
508 GURL url(embedded_test_server()->GetURL("/media/getusermedia.html")); 538 GURL url(embedded_test_server()->GetURL("/media/getusermedia.html"));
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
581 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); 611 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady());
582 ASSERT_TRUE(CommandLine::ForCurrentProcess()->HasSwitch( 612 ASSERT_TRUE(CommandLine::ForCurrentProcess()->HasSwitch(
583 switches::kUseFakeDeviceForMediaStream)) 613 switches::kUseFakeDeviceForMediaStream))
584 << "Must run with fake devices since the test will explicitly look " 614 << "Must run with fake devices since the test will explicitly look "
585 << "for the fake device signal."; 615 << "for the fake device signal.";
586 616
587 GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html")); 617 GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html"));
588 NavigateToURL(shell(), url); 618 NavigateToURL(shell(), url);
589 619
590 EXPECT_TRUE(ExecuteJavascript( 620 EXPECT_TRUE(ExecuteJavascript(
591 base::StringPrintf("callAndEnsureAudioIsPlaying(%s);", kForceIsac16K))); 621 base::StringPrintf("setForceIsac16K(%s);", kForceIsac16K)));
622 EXPECT_TRUE(ExecuteJavascript("callAndEnsureAudioIsPlaying();"));
592 ExpectTitle("OK"); 623 ExpectTitle("OK");
593 } 624 }
594 625
595 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, 626 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest,
596 EstablishAudioVideoCallAndVerifyMutingWorks) { 627 EstablishAudioVideoCallAndVerifyMutingWorks) {
597 if (!media::AudioManager::Get()->HasAudioOutputDevices()) { 628 if (!media::AudioManager::Get()->HasAudioOutputDevices()) {
598 // Bots with no output devices will force the audio code into a different 629 // Bots with no output devices will force the audio code into a different
599 // path where it doesn't manage to set either the low or high latency path. 630 // path where it doesn't manage to set either the low or high latency path.
600 // This test will compute useless values in that case, so skip running on 631 // This test will compute useless values in that case, so skip running on
601 // such bots (see crbug.com/326338). 632 // such bots (see crbug.com/326338).
602 LOG(INFO) << "Missing output devices: skipping test..."; 633 LOG(INFO) << "Missing output devices: skipping test...";
603 return; 634 return;
604 } 635 }
605 636
606 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); 637 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady());
607 ASSERT_TRUE(CommandLine::ForCurrentProcess()->HasSwitch( 638 ASSERT_TRUE(CommandLine::ForCurrentProcess()->HasSwitch(
608 switches::kUseFakeDeviceForMediaStream)) 639 switches::kUseFakeDeviceForMediaStream))
609 << "Must run with fake devices since the test will explicitly look " 640 << "Must run with fake devices since the test will explicitly look "
610 << "for the fake device signal."; 641 << "for the fake device signal.";
611 642
612 GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html")); 643 GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html"));
613 NavigateToURL(shell(), url); 644 NavigateToURL(shell(), url);
614 645
615 EXPECT_TRUE(ExecuteJavascript( 646 EXPECT_TRUE(ExecuteJavascript(
616 base::StringPrintf("callAndEnsureAudioMutingWorks(%s);", 647 base::StringPrintf("setForceIsac16K(%s);", kForceIsac16K)));
617 kForceIsac16K))); 648 EXPECT_TRUE(ExecuteJavascript("callAndEnsureAudioMutingWorks();"));
618 ExpectTitle("OK"); 649 ExpectTitle("OK");
619 } 650 }
620 651
621 } // namespace content 652 } // namespace content
OLDNEW
« no previous file with comments | « build/android/pylib/gtest/filter/content_browsertests_disabled ('k') | content/test/data/media/peerconnection-call.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698