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

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

Issue 118163002: All WebRTC content browsertests will now force iSAC 16K on Android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 6 years, 11 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 | 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"
11 #include "content/browser/media/webrtc_internals.h" 11 #include "content/browser/media/webrtc_internals.h"
12 #include "content/browser/web_contents/web_contents_impl.h" 12 #include "content/browser/web_contents/web_contents_impl.h"
13 #include "content/public/common/content_switches.h" 13 #include "content/public/common/content_switches.h"
14 #include "content/public/test/browser_test_utils.h" 14 #include "content/public/test/browser_test_utils.h"
15 #include "content/shell/browser/shell.h" 15 #include "content/shell/browser/shell.h"
16 #include "content/test/content_browser_test.h" 16 #include "content/test/content_browser_test.h"
17 #include "content/test/content_browser_test_utils.h" 17 #include "content/test/content_browser_test_utils.h"
18 #include "media/audio/audio_manager.h" 18 #include "media/audio/audio_manager.h"
19 #include "net/test/embedded_test_server/embedded_test_server.h" 19 #include "net/test/embedded_test_server/embedded_test_server.h"
20 #include "testing/perf/perf_test.h" 20 #include "testing/perf/perf_test.h"
21 21
22 #if defined(OS_WIN) 22 #if defined(OS_WIN)
23 #include "base/win/windows_version.h" 23 #include "base/win/windows_version.h"
24 #endif 24 #endif
25 25
26 const char kForceIsac16K[] =
27 #ifdef OS_ANDROID
28 // The default audio codec, Opus, doesn't work on Android.
29 "true";
30 #else
31 "false";
32 #endif
33
34 namespace { 26 namespace {
35 27
36 static const char kGetUserMediaAndStop[] = "getUserMediaAndStop"; 28 static const char kGetUserMediaAndStop[] = "getUserMediaAndStop";
37 static const char kGetUserMediaAndWaitAndStop[] = "getUserMediaAndWaitAndStop"; 29 static const char kGetUserMediaAndWaitAndStop[] = "getUserMediaAndWaitAndStop";
38 static const char kGetUserMediaAndAnalyseAndStop[] = 30 static const char kGetUserMediaAndAnalyseAndStop[] =
39 "getUserMediaAndAnalyseAndStop"; 31 "getUserMediaAndAnalyseAndStop";
40 32
41 // Results returned by JS. 33 // Results returned by JS.
42 static const char kOK[] = "OK"; 34 static const char kOK[] = "OK";
43 static const char kGetUserMediaFailed[] = 35 static const char kGetUserMediaFailed[] =
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 109
118 int error_code; 110 int error_code;
119 std::string error_message; 111 std::string error_message;
120 scoped_ptr<base::Value> value( 112 scoped_ptr<base::Value> value(
121 base::JSONReader::ReadAndReturnError(contents, 113 base::JSONReader::ReadAndReturnError(contents,
122 base::JSON_ALLOW_TRAILING_COMMAS, 114 base::JSON_ALLOW_TRAILING_COMMAS,
123 &error_code, 115 &error_code,
124 &error_message)); 116 &error_message));
125 117
126 ASSERT_TRUE(value.get() != NULL) << error_message; 118 ASSERT_TRUE(value.get() != NULL) << error_message;
127 EXPECT_EQ(value->GetType(), base::Value::TYPE_LIST); 119 ASSERT_EQ(value->GetType(), base::Value::TYPE_LIST);
128 120
129 base::ListValue* values; 121 base::ListValue* values;
130 ASSERT_TRUE(value->GetAsList(&values)); 122 ASSERT_TRUE(value->GetAsList(&values));
131 123
132 int duration_ns = 0; 124 int duration_ns = 0;
133 std::string samples_duration; 125 std::string samples_duration;
134 double timestamp_ns = 0.0; 126 double timestamp_ns = 0.0;
135 double previous_timestamp_ns = 0.0; 127 double previous_timestamp_ns = 0.0;
136 std::string samples_interarrival_ns; 128 std::string samples_interarrival_ns;
137 for (base::ListValue::iterator it = values->begin(); 129 for (base::ListValue::iterator it = values->begin();
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 javascript, 213 javascript,
222 &result)); 214 &result));
223 return result; 215 return result;
224 } 216 }
225 217
226 void ExpectTitle(const std::string& expected_title) const { 218 void ExpectTitle(const std::string& expected_title) const {
227 base::string16 expected_title16(base::ASCIIToUTF16(expected_title)); 219 base::string16 expected_title16(base::ASCIIToUTF16(expected_title));
228 TitleWatcher title_watcher(shell()->web_contents(), expected_title16); 220 TitleWatcher title_watcher(shell()->web_contents(), expected_title16);
229 EXPECT_EQ(expected_title16, title_watcher.WaitAndGetTitle()); 221 EXPECT_EQ(expected_title16, title_watcher.WaitAndGetTitle());
230 } 222 }
223
224 // Convenience function since most peerconnection-call.html tests just load
225 // the page, kick off some javascript and wait for the title to change to OK.
226 void MakeTypicalPeerConnectionCall(const std::string& javascript) {
227 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady());
228
229 GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html"));
230 NavigateToURL(shell(), url);
231
232 #if defined (OS_ANDROID)
233 // Always force iSAC 16K on Android for now (Opus is broken).
234 ASSERT_TRUE(ExecuteJavascript("forceIsac16KInSdp();"));
235 #endif
236
237 ASSERT_TRUE(ExecuteJavascript(javascript));
238 ExpectTitle("OK");
239 }
231 }; 240 };
232 241
233 // These tests will all make a getUserMedia call with different constraints and 242 // These tests will all make a getUserMedia call with different constraints and
234 // see that the success callback is called. If the error callback is called or 243 // see that the success callback is called. If the error callback is called or
235 // none of the callbacks are called the tests will simply time out and fail. 244 // none of the callbacks are called the tests will simply time out and fail.
236 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, GetVideoStreamAndStop) { 245 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, GetVideoStreamAndStop) {
237 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); 246 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady());
238 247
239 GURL url(embedded_test_server()->GetURL("/media/getusermedia.html")); 248 GURL url(embedded_test_server()->GetURL("/media/getusermedia.html"));
240 NavigateToURL(shell(), url); 249 NavigateToURL(shell(), url);
241 250
242 EXPECT_TRUE(ExecuteJavascript( 251 ASSERT_TRUE(ExecuteJavascript(
243 base::StringPrintf("%s({video: true});", kGetUserMediaAndStop))); 252 base::StringPrintf("%s({video: true});", kGetUserMediaAndStop)));
244 253
245 ExpectTitle("OK"); 254 ExpectTitle("OK");
246 } 255 }
247 256
248 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, GetAudioAndVideoStreamAndStop) { 257 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, GetAudioAndVideoStreamAndStop) {
249 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); 258 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady());
250 259
251 GURL url(embedded_test_server()->GetURL("/media/getusermedia.html")); 260 GURL url(embedded_test_server()->GetURL("/media/getusermedia.html"));
252 NavigateToURL(shell(), url); 261 NavigateToURL(shell(), url);
253 262
254 EXPECT_TRUE(ExecuteJavascript(base::StringPrintf( 263 ASSERT_TRUE(ExecuteJavascript(base::StringPrintf(
255 "%s({video: true, audio: true});", kGetUserMediaAndStop))); 264 "%s({video: true, audio: true});", kGetUserMediaAndStop)));
256 265
257 ExpectTitle("OK"); 266 ExpectTitle("OK");
258 } 267 }
259 268
260 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, GetAudioAndVideoStreamAndClone) { 269 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, GetAudioAndVideoStreamAndClone) {
261 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); 270 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady());
262 271
263 GURL url(embedded_test_server()->GetURL("/media/getusermedia.html")); 272 GURL url(embedded_test_server()->GetURL("/media/getusermedia.html"));
264 NavigateToURL(shell(), url); 273 NavigateToURL(shell(), url);
265 274
266 EXPECT_TRUE(ExecuteJavascript("getUserMediaAndClone();")); 275 ASSERT_TRUE(ExecuteJavascript("getUserMediaAndClone();"));
267 276
268 ExpectTitle("OK"); 277 ExpectTitle("OK");
269 } 278 }
270 279
271 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, GetUserMediaWithMandatorySourceID) { 280 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, GetUserMediaWithMandatorySourceID) {
272 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); 281 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady());
273 282
274 std::vector<std::string> audio_ids; 283 std::vector<std::string> audio_ids;
275 std::vector<std::string> video_ids; 284 std::vector<std::string> video_ids;
276 GetSources(&audio_ids, &video_ids); 285 GetSources(&audio_ids, &video_ids);
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(ARCH_CPU_ARM_FAMILY) 394 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(ARCH_CPU_ARM_FAMILY)
386 // Timing out on ARM linux bot: http://crbug.com/238490 395 // Timing out on ARM linux bot: http://crbug.com/238490
387 #define MAYBE_CanSetupVideoCall DISABLED_CanSetupVideoCall 396 #define MAYBE_CanSetupVideoCall DISABLED_CanSetupVideoCall
388 #else 397 #else
389 #define MAYBE_CanSetupVideoCall CanSetupVideoCall 398 #define MAYBE_CanSetupVideoCall CanSetupVideoCall
390 #endif 399 #endif
391 400
392 // These tests will make a complete PeerConnection-based call and verify that 401 // These tests will make a complete PeerConnection-based call and verify that
393 // video is playing for the call. 402 // video is playing for the call.
394 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, MAYBE_CanSetupVideoCall) { 403 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, MAYBE_CanSetupVideoCall) {
395 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); 404 MakeTypicalPeerConnectionCall("call({video: true});");
396
397 GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html"));
398 NavigateToURL(shell(), url);
399
400 EXPECT_TRUE(ExecuteJavascript("call({video: true});"));
401 ExpectTitle("OK");
402 } 405 }
403 406
404 // This test will make a simple getUserMedia page, verify that video is playing 407 // This test will make a simple getUserMedia page, verify that video is playing
405 // in a simple local <video>, and for a couple of seconds, collect some 408 // in a simple local <video>, and for a couple of seconds, collect some
406 // performance traces. 409 // performance traces.
407 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, TracePerformanceDuringGetUserMedia) { 410 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, TracePerformanceDuringGetUserMedia) {
408 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); 411 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady());
409 412
410 GURL url(embedded_test_server()->GetURL("/media/getusermedia.html")); 413 GURL url(embedded_test_server()->GetURL("/media/getusermedia.html"));
411 NavigateToURL(shell(), url); 414 NavigateToURL(shell(), url);
412 // Put getUserMedia to work and let it run for a couple of seconds. 415 // Put getUserMedia to work and let it run for a couple of seconds.
413 EXPECT_TRUE(ExecuteJavascript(base::StringPrintf( 416 ASSERT_TRUE(ExecuteJavascript(base::StringPrintf(
414 "%s({video: true}, 10);", kGetUserMediaAndWaitAndStop))); 417 "%s({video: true}, 10);", kGetUserMediaAndWaitAndStop)));
415 418
416 // Make sure the stream is up and running, then start collecting traces. 419 // Make sure the stream is up and running, then start collecting traces.
417 ExpectTitle("Running..."); 420 ExpectTitle("Running...");
418 base::debug::TraceLog* trace_log = base::debug::TraceLog::GetInstance(); 421 base::debug::TraceLog* trace_log = base::debug::TraceLog::GetInstance();
419 trace_log->SetEnabled(base::debug::CategoryFilter("video"), 422 trace_log->SetEnabled(base::debug::CategoryFilter("video"),
420 base::debug::TraceLog::ENABLE_SAMPLING); 423 base::debug::TraceLog::ENABLE_SAMPLING);
421 // Check that we are indeed recording. 424 // Check that we are indeed recording.
422 EXPECT_EQ(trace_log->GetNumTracesRecorded(), 1); 425 ASSERT_EQ(trace_log->GetNumTracesRecorded(), 1);
423 426
424 // Wait until the page title changes to "OK". Do not sleep() here since that 427 // Wait until the page title changes to "OK". Do not sleep() here since that
425 // would stop both this code and the browser underneath. 428 // would stop both this code and the browser underneath.
426 ExpectTitle("OK"); 429 ExpectTitle("OK");
427 430
428 // Note that we need to stop the trace recording before flushing the data. 431 // Note that we need to stop the trace recording before flushing the data.
429 trace_log->SetDisabled(); 432 trace_log->SetDisabled();
430 trace_log->Flush(base::Bind(&WebrtcBrowserTest::DumpChromeTraceCallback, 433 trace_log->Flush(base::Bind(&WebrtcBrowserTest::DumpChromeTraceCallback,
431 base::Unretained(this))); 434 base::Unretained(this)));
432 } 435 }
433 436
434 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(ARCH_CPU_ARM_FAMILY) 437 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(ARCH_CPU_ARM_FAMILY)
435 // Timing out on ARM linux, see http://crbug.com/240376 438 // Timing out on ARM linux, see http://crbug.com/240376
436 #define MAYBE_CanSetupAudioAndVideoCall DISABLED_CanSetupAudioAndVideoCall 439 #define MAYBE_CanSetupAudioAndVideoCall DISABLED_CanSetupAudioAndVideoCall
437 #else 440 #else
438 #define MAYBE_CanSetupAudioAndVideoCall CanSetupAudioAndVideoCall 441 #define MAYBE_CanSetupAudioAndVideoCall CanSetupAudioAndVideoCall
439 #endif 442 #endif
440 443
441 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, MAYBE_CanSetupAudioAndVideoCall) { 444 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, MAYBE_CanSetupAudioAndVideoCall) {
442 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); 445 MakeTypicalPeerConnectionCall("call({video: true, audio: true});");
443
444 GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html"));
445 NavigateToURL(shell(), url);
446
447 EXPECT_TRUE(ExecuteJavascript("call({video: true, audio: true});"));
448 ExpectTitle("OK");
449 } 446 }
450 447
451 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, MANUAL_CanSetupCallAndSendDtmf) { 448 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, MANUAL_CanSetupCallAndSendDtmf) {
452 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); 449 MakeTypicalPeerConnectionCall("callAndSendDtmf('123,abc');");
453
454 GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html"));
455 NavigateToURL(shell(), url);
456
457 EXPECT_TRUE(
458 ExecuteJavascript("callAndSendDtmf('123,abc');"));
459 } 450 }
460 451
461 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, 452 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest,
462 DISABLED_CanMakeEmptyCallThenAddStreamsAndRenegotiate) { 453 DISABLED_CanMakeEmptyCallThenAddStreamsAndRenegotiate) {
463 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady());
464
465 GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html"));
466 NavigateToURL(shell(), url);
467
468 const char* kJavascript = 454 const char* kJavascript =
469 "callEmptyThenAddOneStreamAndRenegotiate({video: true, audio: true});"; 455 "callEmptyThenAddOneStreamAndRenegotiate({video: true, audio: true});";
470 EXPECT_TRUE(ExecuteJavascript(kJavascript)); 456 MakeTypicalPeerConnectionCall(kJavascript);
471 ExpectTitle("OK");
472 } 457 }
473 458
474 // Below 2 test will make a complete PeerConnection-based call between pc1 and 459 // Below 2 test will make a complete PeerConnection-based call between pc1 and
475 // pc2, and then use the remote stream to setup a call between pc3 and pc4, and 460 // pc2, and then use the remote stream to setup a call between pc3 and pc4, and
476 // then verify that video is received on pc3 and pc4. 461 // then verify that video is received on pc3 and pc4.
477 // Flaky on win xp. http://crbug.com/304775 462 // Flaky on win xp. http://crbug.com/304775
478 #if defined(OS_WIN) 463 #if defined(OS_WIN)
479 #define MAYBE_CanForwardRemoteStream DISABLED_CanForwardRemoteStream 464 #define MAYBE_CanForwardRemoteStream DISABLED_CanForwardRemoteStream
480 #define MAYBE_CanForwardRemoteStream720p DISABLED_CanForwardRemoteStream720p 465 #define MAYBE_CanForwardRemoteStream720p DISABLED_CanForwardRemoteStream720p
481 #else 466 #else
482 #define MAYBE_CanForwardRemoteStream CanForwardRemoteStream 467 #define MAYBE_CanForwardRemoteStream CanForwardRemoteStream
483 #define MAYBE_CanForwardRemoteStream720p CanForwardRemoteStream720p 468 #define MAYBE_CanForwardRemoteStream720p CanForwardRemoteStream720p
484 #endif 469 #endif
485 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, MAYBE_CanForwardRemoteStream) { 470 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, MAYBE_CanForwardRemoteStream) {
486 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); 471 MakeTypicalPeerConnectionCall(
487 472 "callAndForwardRemoteStream({video: true, audio: true});");
488 GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html"));
489 NavigateToURL(shell(), url);
490
491 EXPECT_TRUE(ExecuteJavascript(
492 "callAndForwardRemoteStream({video: true, audio: true});"));
493 ExpectTitle("OK");
494 } 473 }
495 474
496 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, MAYBE_CanForwardRemoteStream720p) { 475 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, MAYBE_CanForwardRemoteStream720p) {
497 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); 476 const std::string javascript = GenerateGetUserMediaCall(
498 477 "callAndForwardRemoteStream", 1280, 1280, 720, 720, 30, 30);
499 GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html")); 478 MakeTypicalPeerConnectionCall(javascript);
500 NavigateToURL(shell(), url);
501
502 const std::string cmd = GenerateGetUserMediaCall("callAndForwardRemoteStream",
503 1280, 1280,
504 720, 720, 30, 30);
505 EXPECT_TRUE(ExecuteJavascript(cmd));
506 ExpectTitle("OK");
507 } 479 }
508 480
509 // This test will make a complete PeerConnection-based call but remove the 481 // This test will make a complete PeerConnection-based call but remove the
510 // MSID and bundle attribute from the initial offer to verify that 482 // MSID and bundle attribute from the initial offer to verify that
511 // video is playing for the call even if the initiating client don't support 483 // video is playing for the call even if the initiating client don't support
512 // MSID. http://tools.ietf.org/html/draft-alvestrand-rtcweb-msid-02 484 // MSID. http://tools.ietf.org/html/draft-alvestrand-rtcweb-msid-02
513 #if defined(OS_WIN) && defined(USE_AURA) 485 #if defined(OS_WIN) && defined(USE_AURA)
514 // Disabled for win7_aura, see http://crbug.com/235089. 486 // Disabled for win7_aura, see http://crbug.com/235089.
515 #define MAYBE_CanSetupAudioAndVideoCallWithoutMsidAndBundle\ 487 #define MAYBE_CanSetupAudioAndVideoCallWithoutMsidAndBundle\
516 DISABLED_CanSetupAudioAndVideoCallWithoutMsidAndBundle 488 DISABLED_CanSetupAudioAndVideoCallWithoutMsidAndBundle
517 #elif defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(ARCH_CPU_ARM_FAMILY) 489 #elif defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(ARCH_CPU_ARM_FAMILY)
518 // Timing out on ARM linux, see http://crbug.com/240373 490 // Timing out on ARM linux, see http://crbug.com/240373
519 #define MAYBE_CanSetupAudioAndVideoCallWithoutMsidAndBundle\ 491 #define MAYBE_CanSetupAudioAndVideoCallWithoutMsidAndBundle\
520 DISABLED_CanSetupAudioAndVideoCallWithoutMsidAndBundle 492 DISABLED_CanSetupAudioAndVideoCallWithoutMsidAndBundle
521 #else 493 #else
522 #define MAYBE_CanSetupAudioAndVideoCallWithoutMsidAndBundle\ 494 #define MAYBE_CanSetupAudioAndVideoCallWithoutMsidAndBundle\
523 CanSetupAudioAndVideoCallWithoutMsidAndBundle 495 CanSetupAudioAndVideoCallWithoutMsidAndBundle
524 #endif 496 #endif
525 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, 497 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest,
526 MAYBE_CanSetupAudioAndVideoCallWithoutMsidAndBundle) { 498 MAYBE_CanSetupAudioAndVideoCallWithoutMsidAndBundle) {
527 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); 499 MakeTypicalPeerConnectionCall("callWithoutMsidAndBundle();");
528
529 GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html"));
530 NavigateToURL(shell(), url);
531
532 EXPECT_TRUE(ExecuteJavascript("callWithoutMsidAndBundle();"));
533 ExpectTitle("OK");
534 } 500 }
535 501
536 // This test will modify the SDP offer to an unsupported codec, which should 502 // This test will modify the SDP offer to an unsupported codec, which should
537 // cause SetLocalDescription to fail. 503 // cause SetLocalDescription to fail.
538 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, 504 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, NegotiateUnsupportedVideoCodec) {
539 NegotiateUnsupportedVideoCodec) { 505 MakeTypicalPeerConnectionCall("negotiateUnsupportedVideoCodec();");
540 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady());
541
542 GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html"));
543 NavigateToURL(shell(), url);
544
545 EXPECT_TRUE(ExecuteJavascript("negotiateUnsupportedVideoCodec();"));
546 ExpectTitle("OK");
547 } 506 }
548 507
549 // This test will modify the SDP offer to use no encryption, which should 508 // This test will modify the SDP offer to use no encryption, which should
550 // cause SetLocalDescription to fail. 509 // cause SetLocalDescription to fail.
551 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, NegotiateNonCryptoCall) { 510 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, NegotiateNonCryptoCall) {
552 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); 511 MakeTypicalPeerConnectionCall("negotiateNonCryptoCall();");
553
554 GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html"));
555 NavigateToURL(shell(), url);
556
557 EXPECT_TRUE(ExecuteJavascript("negotiateNonCryptoCall();"));
558 ExpectTitle("OK");
559 } 512 }
560 513
561 // This test will make a complete PeerConnection-based call using legacy SDP 514 // This test will make a complete PeerConnection-based call using legacy SDP
562 // settings: GIce, external SDES, and no BUNDLE. 515 // settings: GIce, external SDES, and no BUNDLE.
563 #if defined(OS_WIN) && defined(USE_AURA) 516 #if defined(OS_WIN) && defined(USE_AURA)
564 // Disabled for win7_aura, see http://crbug.com/235089. 517 // Disabled for win7_aura, see http://crbug.com/235089.
565 #define MAYBE_CanSetupLegacyCall DISABLED_CanSetupLegacyCall 518 #define MAYBE_CanSetupLegacyCall DISABLED_CanSetupLegacyCall
566 #elif defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(ARCH_CPU_ARM_FAMILY) 519 #elif defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(ARCH_CPU_ARM_FAMILY)
567 // Timing out on ARM linux, see http://crbug.com/240373 520 // Timing out on ARM linux, see http://crbug.com/240373
568 #define MAYBE_CanSetupLegacyCall DISABLED_CanSetupLegacyCall 521 #define MAYBE_CanSetupLegacyCall DISABLED_CanSetupLegacyCall
569 #else 522 #else
570 #define MAYBE_CanSetupLegacyCall CanSetupLegacyCall 523 #define MAYBE_CanSetupLegacyCall CanSetupLegacyCall
571 #endif 524 #endif
572 525
573 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, MAYBE_CanSetupLegacyCall) { 526 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, MAYBE_CanSetupLegacyCall) {
574 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); 527 MakeTypicalPeerConnectionCall("callWithLegacySdp();");
575
576 GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html"));
577 NavigateToURL(shell(), url);
578
579 EXPECT_TRUE(ExecuteJavascript("callWithLegacySdp();"));
580 ExpectTitle("OK");
581 } 528 }
582 529
583 // This test will make a PeerConnection-based call and test an unreliable text 530 // This test will make a PeerConnection-based call and test an unreliable text
584 // dataChannel. 531 // dataChannel.
585 // TODO(mallinath) - Remove this test after rtp based data channel is disabled. 532 // TODO(mallinath) - Remove this test after rtp based data channel is disabled.
586 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, CallWithDataOnly) { 533 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, CallWithDataOnly) {
587 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); 534 MakeTypicalPeerConnectionCall("callWithDataOnly();");
588
589 GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html"));
590 NavigateToURL(shell(), url);
591
592 EXPECT_TRUE(ExecuteJavascript("callWithDataOnly();"));
593 ExpectTitle("OK");
594 } 535 }
595 536
596 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, CallWithSctpDataOnly) { 537 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, CallWithSctpDataOnly) {
597 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); 538 MakeTypicalPeerConnectionCall("callWithSctpDataOnly();");
598
599 GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html"));
600 NavigateToURL(shell(), url);
601
602 EXPECT_TRUE(ExecuteJavascript("callWithSctpDataOnly();"));
603 ExpectTitle("OK");
604 } 539 }
605 540
606 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(ARCH_CPU_ARM_FAMILY) 541 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(ARCH_CPU_ARM_FAMILY)
607 // Timing out on ARM linux bot: http://crbug.com/238490 542 // Timing out on ARM linux bot: http://crbug.com/238490
608 #define MAYBE_CallWithDataAndMedia DISABLED_CallWithDataAndMedia 543 #define MAYBE_CallWithDataAndMedia DISABLED_CallWithDataAndMedia
609 #else 544 #else
610 #define MAYBE_CallWithDataAndMedia CallWithDataAndMedia 545 #define MAYBE_CallWithDataAndMedia CallWithDataAndMedia
611 #endif 546 #endif
612 547
613 // This test will make a PeerConnection-based call and test an unreliable text 548 // This test will make a PeerConnection-based call and test an unreliable text
614 // dataChannel and audio and video tracks. 549 // dataChannel and audio and video tracks.
615 // TODO(mallinath) - Remove this test after rtp based data channel is disabled. 550 // TODO(mallinath) - Remove this test after rtp based data channel is disabled.
616 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, MAYBE_CallWithDataAndMedia) { 551 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, MAYBE_CallWithDataAndMedia) {
617 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); 552 MakeTypicalPeerConnectionCall("callWithDataAndMedia();");
618
619 GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html"));
620 NavigateToURL(shell(), url);
621
622 EXPECT_TRUE(ExecuteJavascript("callWithDataAndMedia();"));
623 ExpectTitle("OK");
624 } 553 }
625 554
626 555
627 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(ARCH_CPU_ARM_FAMILY) 556 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(ARCH_CPU_ARM_FAMILY)
628 // Timing out on ARM linux bot: http://crbug.com/238490 557 // Timing out on ARM linux bot: http://crbug.com/238490
629 #define MAYBE_CallWithSctpDataAndMedia DISABLED_CallWithSctpDataAndMedia 558 #define MAYBE_CallWithSctpDataAndMedia DISABLED_CallWithSctpDataAndMedia
630 #else 559 #else
631 #define MAYBE_CallWithSctpDataAndMedia CallWithSctpDataAndMedia 560 #define MAYBE_CallWithSctpDataAndMedia CallWithSctpDataAndMedia
632 #endif 561 #endif
633 562
634 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, 563 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest,
635 MAYBE_CallWithSctpDataAndMedia) { 564 MAYBE_CallWithSctpDataAndMedia) {
636 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); 565 MakeTypicalPeerConnectionCall("callWithSctpDataAndMedia();");
637
638 GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html"));
639 NavigateToURL(shell(), url);
640
641 EXPECT_TRUE(ExecuteJavascript("callWithSctpDataAndMedia();"));
642 ExpectTitle("OK");
643 } 566 }
644 567
645 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(ARCH_CPU_ARM_FAMILY) 568 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(ARCH_CPU_ARM_FAMILY)
646 // Timing out on ARM linux bot: http://crbug.com/238490 569 // Timing out on ARM linux bot: http://crbug.com/238490
647 #define MAYBE_CallWithDataAndLaterAddMedia DISABLED_CallWithDataAndLaterAddMedia 570 #define MAYBE_CallWithDataAndLaterAddMedia DISABLED_CallWithDataAndLaterAddMedia
648 #else 571 #else
649 // Temporarily disable the test on all platforms. http://crbug.com/293252 572 // Temporarily disable the test on all platforms. http://crbug.com/293252
650 #define MAYBE_CallWithDataAndLaterAddMedia DISABLED_CallWithDataAndLaterAddMedia 573 #define MAYBE_CallWithDataAndLaterAddMedia DISABLED_CallWithDataAndLaterAddMedia
651 #endif 574 #endif
652 575
653 // This test will make a PeerConnection-based call and test an unreliable text 576 // This test will make a PeerConnection-based call and test an unreliable text
654 // dataChannel and later add an audio and video track. 577 // dataChannel and later add an audio and video track.
655 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, MAYBE_CallWithDataAndLaterAddMedia) { 578 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, MAYBE_CallWithDataAndLaterAddMedia) {
656 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); 579 MakeTypicalPeerConnectionCall("callWithDataAndLaterAddMedia();");
657
658 GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html"));
659 NavigateToURL(shell(), url);
660
661 EXPECT_TRUE(ExecuteJavascript("callWithDataAndLaterAddMedia();"));
662 ExpectTitle("OK");
663 } 580 }
664 581
665 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(ARCH_CPU_ARM_FAMILY) 582 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(ARCH_CPU_ARM_FAMILY)
666 // Timing out on ARM linux bot: http://crbug.com/238490 583 // Timing out on ARM linux bot: http://crbug.com/238490
667 #define MAYBE_CallWithNewVideoMediaStream DISABLED_CallWithNewVideoMediaStream 584 #define MAYBE_CallWithNewVideoMediaStream DISABLED_CallWithNewVideoMediaStream
668 #else 585 #else
669 #define MAYBE_CallWithNewVideoMediaStream CallWithNewVideoMediaStream 586 #define MAYBE_CallWithNewVideoMediaStream CallWithNewVideoMediaStream
670 #endif 587 #endif
671 588
672 // This test will make a PeerConnection-based call and send a new Video 589 // This test will make a PeerConnection-based call and send a new Video
673 // MediaStream that has been created based on a MediaStream created with 590 // MediaStream that has been created based on a MediaStream created with
674 // getUserMedia. 591 // getUserMedia.
675 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, MAYBE_CallWithNewVideoMediaStream) { 592 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, MAYBE_CallWithNewVideoMediaStream) {
676 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); 593 MakeTypicalPeerConnectionCall("callWithNewVideoMediaStream();");
677
678 GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html"));
679 NavigateToURL(shell(), url);
680
681 EXPECT_TRUE(ExecuteJavascript("callWithNewVideoMediaStream();"));
682 ExpectTitle("OK");
683 } 594 }
684 595
685 // This test will make a PeerConnection-based call and send a new Video 596 // This test will make a PeerConnection-based call and send a new Video
686 // MediaStream that has been created based on a MediaStream created with 597 // MediaStream that has been created based on a MediaStream created with
687 // getUserMedia. When video is flowing, the VideoTrack is removed and an 598 // getUserMedia. When video is flowing, the VideoTrack is removed and an
688 // AudioTrack is added instead. 599 // AudioTrack is added instead.
689 // TODO(phoglund): This test is manual since not all buildbots has an audio 600 // TODO(phoglund): This test is manual since not all buildbots has an audio
690 // input. 601 // input.
691 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, MANUAL_CallAndModifyStream) { 602 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, MANUAL_CallAndModifyStream) {
692 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); 603 MakeTypicalPeerConnectionCall(
693 604 "callWithNewVideoMediaStreamLaterSwitchToAudio();");
694 GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html"));
695 NavigateToURL(shell(), url);
696
697 EXPECT_TRUE(
698 ExecuteJavascript("callWithNewVideoMediaStreamLaterSwitchToAudio();"));
699 ExpectTitle("OK");
700 } 605 }
701 606
702 // This test calls getUserMedia in sequence with different constraints. 607 // This test calls getUserMedia in sequence with different constraints.
703 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, TestGetUserMediaConstraints) { 608 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, TestGetUserMediaConstraints) {
704 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); 609 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady());
705 610
706 GURL url(embedded_test_server()->GetURL("/media/getusermedia.html")); 611 GURL url(embedded_test_server()->GetURL("/media/getusermedia.html"));
707 612
708 std::vector<std::string> list_of_get_user_media_calls; 613 std::vector<std::string> list_of_get_user_media_calls;
709 list_of_get_user_media_calls.push_back(GenerateGetUserMediaCall( 614 list_of_get_user_media_calls.push_back(GenerateGetUserMediaCall(
(...skipping 10 matching lines...) Expand all
720 kGetUserMediaAndStop, 1280, 1280, 720, 720, 30, 30)); 625 kGetUserMediaAndStop, 1280, 1280, 720, 720, 30, 30));
721 list_of_get_user_media_calls.push_back(GenerateGetUserMediaCall( 626 list_of_get_user_media_calls.push_back(GenerateGetUserMediaCall(
722 kGetUserMediaAndStop, 1920, 1920, 1080, 1080, 30, 30)); 627 kGetUserMediaAndStop, 1920, 1920, 1080, 1080, 30, 30));
723 628
724 for (std::vector<std::string>::iterator const_iterator = 629 for (std::vector<std::string>::iterator const_iterator =
725 list_of_get_user_media_calls.begin(); 630 list_of_get_user_media_calls.begin();
726 const_iterator != list_of_get_user_media_calls.end(); 631 const_iterator != list_of_get_user_media_calls.end();
727 ++const_iterator) { 632 ++const_iterator) {
728 DVLOG(1) << "Calling getUserMedia: " << *const_iterator; 633 DVLOG(1) << "Calling getUserMedia: " << *const_iterator;
729 NavigateToURL(shell(), url); 634 NavigateToURL(shell(), url);
730 EXPECT_TRUE(ExecuteJavascript(*const_iterator)); 635 ASSERT_TRUE(ExecuteJavascript(*const_iterator));
731 ExpectTitle("OK"); 636 ExpectTitle("OK");
732 } 637 }
733 } 638 }
734 639
735 // This test calls getUserMedia and checks for aspect ratio behavior. 640 // This test calls getUserMedia and checks for aspect ratio behavior.
736 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, TestGetUserMediaAspectRatio) { 641 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, TestGetUserMediaAspectRatio) {
737 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); 642 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady());
738 643
739 GURL url(embedded_test_server()->GetURL("/media/getusermedia.html")); 644 GURL url(embedded_test_server()->GetURL("/media/getusermedia.html"));
740 645
741 std::string constraints_4_3 = GenerateGetUserMediaCall( 646 std::string constraints_4_3 = GenerateGetUserMediaCall(
742 kGetUserMediaAndAnalyseAndStop, 640, 640, 480, 480, 30, 30); 647 kGetUserMediaAndAnalyseAndStop, 640, 640, 480, 480, 30, 30);
743 std::string constraints_16_9 = GenerateGetUserMediaCall( 648 std::string constraints_16_9 = GenerateGetUserMediaCall(
744 kGetUserMediaAndAnalyseAndStop, 640, 640, 360, 360, 30, 30); 649 kGetUserMediaAndAnalyseAndStop, 640, 640, 360, 360, 30, 30);
745 650
746 // TODO(mcasas): add more aspect ratios, in particular 16:10 crbug.com/275594. 651 // TODO(mcasas): add more aspect ratios, in particular 16:10 crbug.com/275594.
747 652
748 NavigateToURL(shell(), url); 653 NavigateToURL(shell(), url);
749 EXPECT_TRUE(ExecuteJavascript(constraints_4_3)); 654 ASSERT_TRUE(ExecuteJavascript(constraints_4_3));
750 ExpectTitle("4:3 letterbox"); 655 ExpectTitle("4:3 letterbox");
751 656
752 NavigateToURL(shell(), url); 657 NavigateToURL(shell(), url);
753 EXPECT_TRUE(ExecuteJavascript(constraints_16_9)); 658 ASSERT_TRUE(ExecuteJavascript(constraints_16_9));
754 ExpectTitle("16:9 letterbox"); 659 ExpectTitle("16:9 letterbox");
755 } 660 }
756 661
757 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, AddTwoMediaStreamsToOnePC) { 662 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, AddTwoMediaStreamsToOnePC) {
758 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); 663 MakeTypicalPeerConnectionCall("addTwoMediaStreamsToOneConnection();");
759
760 GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html"));
761 NavigateToURL(shell(), url);
762
763 EXPECT_TRUE(
764 ExecuteJavascript("addTwoMediaStreamsToOneConnection();"));
765 ExpectTitle("OK");
766 } 664 }
767 665
768 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, 666 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest,
769 EstablishAudioVideoCallAndMeasureOutputLevel) { 667 EstablishAudioVideoCallAndMeasureOutputLevel) {
770 if (!media::AudioManager::Get()->HasAudioOutputDevices()) { 668 if (!media::AudioManager::Get()->HasAudioOutputDevices()) {
771 // Bots with no output devices will force the audio code into a different 669 // Bots with no output devices will force the audio code into a different
772 // path where it doesn't manage to set either the low or high latency path. 670 // path where it doesn't manage to set either the low or high latency path.
773 // This test will compute useless values in that case, so skip running on 671 // This test will compute useless values in that case, so skip running on
774 // such bots (see crbug.com/326338). 672 // such bots (see crbug.com/326338).
775 LOG(INFO) << "Missing output devices: skipping test..."; 673 LOG(INFO) << "Missing output devices: skipping test...";
776 return; 674 return;
777 } 675 }
778 676
779 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady());
780 ASSERT_TRUE(CommandLine::ForCurrentProcess()->HasSwitch( 677 ASSERT_TRUE(CommandLine::ForCurrentProcess()->HasSwitch(
781 switches::kUseFakeDeviceForMediaStream)) 678 switches::kUseFakeDeviceForMediaStream))
782 << "Must run with fake devices since the test will explicitly look " 679 << "Must run with fake devices since the test will explicitly look "
783 << "for the fake device signal."; 680 << "for the fake device signal.";
784 681
785 GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html")); 682 MakeTypicalPeerConnectionCall("callAndEnsureAudioIsPlaying();");
786 NavigateToURL(shell(), url);
787
788 EXPECT_TRUE(ExecuteJavascript(
789 base::StringPrintf("callAndEnsureAudioIsPlaying(%s);", kForceIsac16K)));
790 ExpectTitle("OK");
791 } 683 }
792 684
793 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, 685 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest,
794 EstablishAudioVideoCallAndVerifyMutingWorks) { 686 EstablishAudioVideoCallAndVerifyMutingWorks) {
795 if (!media::AudioManager::Get()->HasAudioOutputDevices()) { 687 if (!media::AudioManager::Get()->HasAudioOutputDevices()) {
796 // Bots with no output devices will force the audio code into a different 688 // Bots with no output devices will force the audio code into a different
797 // path where it doesn't manage to set either the low or high latency path. 689 // path where it doesn't manage to set either the low or high latency path.
798 // This test will compute useless values in that case, so skip running on 690 // This test will compute useless values in that case, so skip running on
799 // such bots (see crbug.com/326338). 691 // such bots (see crbug.com/326338).
800 LOG(INFO) << "Missing output devices: skipping test..."; 692 LOG(INFO) << "Missing output devices: skipping test...";
801 return; 693 return;
802 } 694 }
803 695
804 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady());
805 ASSERT_TRUE(CommandLine::ForCurrentProcess()->HasSwitch( 696 ASSERT_TRUE(CommandLine::ForCurrentProcess()->HasSwitch(
806 switches::kUseFakeDeviceForMediaStream)) 697 switches::kUseFakeDeviceForMediaStream))
807 << "Must run with fake devices since the test will explicitly look " 698 << "Must run with fake devices since the test will explicitly look "
808 << "for the fake device signal."; 699 << "for the fake device signal.";
809 700
810 GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html")); 701 MakeTypicalPeerConnectionCall("callAndEnsureAudioMutingWorks();");
811 NavigateToURL(shell(), url);
812
813 EXPECT_TRUE(ExecuteJavascript(
814 base::StringPrintf("callAndEnsureAudioMutingWorks(%s);",
815 kForceIsac16K)));
816 ExpectTitle("OK");
817 } 702 }
818 703
819 #if defined(OS_WIN) || (defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(AR CH_CPU_ARM_FAMILY)) 704 #if defined(OS_WIN) || (defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(AR CH_CPU_ARM_FAMILY))
820 // Timing out on ARM linux bot: http://crbug.com/238490 705 // Timing out on ARM linux bot: http://crbug.com/238490
821 // Failing on Windows: http://crbug.com/331035 706 // Failing on Windows: http://crbug.com/331035
822 #define MAYBE_CallWithAecDump DISABLED_CallWithAecDump 707 #define MAYBE_CallWithAecDump DISABLED_CallWithAecDump
823 #else 708 #else
824 #define MAYBE_CallWithAecDump CallWithAecDump 709 #define MAYBE_CallWithAecDump CallWithAecDump
825 #endif 710 #endif
826 711
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
891 EXPECT_TRUE(base::PathExists(dump_file)); 776 EXPECT_TRUE(base::PathExists(dump_file));
892 int64 file_size = 0; 777 int64 file_size = 0;
893 EXPECT_TRUE(base::GetFileSize(dump_file, &file_size)); 778 EXPECT_TRUE(base::GetFileSize(dump_file, &file_size));
894 EXPECT_EQ(0, file_size); 779 EXPECT_EQ(0, file_size);
895 780
896 base::DeleteFile(dump_file, false); 781 base::DeleteFile(dump_file, false);
897 } 782 }
898 783
899 784
900 } // namespace content 785 } // 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