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

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

Issue 120773003: Ported media stream track enable-disable test to content module. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Adding bug id to disable comment 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"
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 #endif 442 #endif
443 443
444 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, MAYBE_CanSetupAudioAndVideoCall) { 444 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, MAYBE_CanSetupAudioAndVideoCall) {
445 MakeTypicalPeerConnectionCall("call({video: true, audio: true});"); 445 MakeTypicalPeerConnectionCall("call({video: true, audio: true});");
446 } 446 }
447 447
448 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, MANUAL_CanSetupCallAndSendDtmf) { 448 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, MANUAL_CanSetupCallAndSendDtmf) {
449 MakeTypicalPeerConnectionCall("callAndSendDtmf('123,abc');"); 449 MakeTypicalPeerConnectionCall("callAndSendDtmf('123,abc');");
450 } 450 }
451 451
452 // TODO(phoglund): this test fails because the peer connection state will be
453 // stable in the second negotiation round rather than have-local-offer.
454 // http://crbug.com/293125.
452 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, 455 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest,
453 DISABLED_CanMakeEmptyCallThenAddStreamsAndRenegotiate) { 456 DISABLED_CanMakeEmptyCallThenAddStreamsAndRenegotiate) {
454 const char* kJavascript = 457 const char* kJavascript =
455 "callEmptyThenAddOneStreamAndRenegotiate({video: true, audio: true});"; 458 "callEmptyThenAddOneStreamAndRenegotiate({video: true, audio: true});";
456 MakeTypicalPeerConnectionCall(kJavascript); 459 MakeTypicalPeerConnectionCall(kJavascript);
457 } 460 }
458 461
459 // Below 2 test will make a complete PeerConnection-based call between pc1 and 462 // Below 2 test will make a complete PeerConnection-based call between pc1 and
460 // pc2, and then use the remote stream to setup a call between pc3 and pc4, and 463 // pc2, and then use the remote stream to setup a call between pc3 and pc4, and
461 // then verify that video is received on pc3 and pc4. 464 // then verify that video is received on pc3 and pc4.
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
694 } 697 }
695 698
696 ASSERT_TRUE(CommandLine::ForCurrentProcess()->HasSwitch( 699 ASSERT_TRUE(CommandLine::ForCurrentProcess()->HasSwitch(
697 switches::kUseFakeDeviceForMediaStream)) 700 switches::kUseFakeDeviceForMediaStream))
698 << "Must run with fake devices since the test will explicitly look " 701 << "Must run with fake devices since the test will explicitly look "
699 << "for the fake device signal."; 702 << "for the fake device signal.";
700 703
701 MakeTypicalPeerConnectionCall("callAndEnsureAudioMutingWorks();"); 704 MakeTypicalPeerConnectionCall("callAndEnsureAudioMutingWorks();");
702 } 705 }
703 706
707 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, CallAndVerifyVideoMutingWorks) {
708 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady());
709
710 GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html"));
711 NavigateToURL(shell(), url);
712
713 EXPECT_TRUE(ExecuteJavascript("callAndEnsureVideoMutingWorks();"));
714 ExpectTitle("OK");
715 }
716
704 #if defined(OS_WIN) || (defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(AR CH_CPU_ARM_FAMILY)) 717 #if defined(OS_WIN) || (defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(AR CH_CPU_ARM_FAMILY))
705 // Timing out on ARM linux bot: http://crbug.com/238490 718 // Timing out on ARM linux bot: http://crbug.com/238490
706 // Failing on Windows: http://crbug.com/331035 719 // Failing on Windows: http://crbug.com/331035
707 #define MAYBE_CallWithAecDump DISABLED_CallWithAecDump 720 #define MAYBE_CallWithAecDump DISABLED_CallWithAecDump
708 #else 721 #else
709 #define MAYBE_CallWithAecDump CallWithAecDump 722 #define MAYBE_CallWithAecDump CallWithAecDump
710 #endif 723 #endif
711 724
712 // This tests will make a complete PeerConnection-based call, verify that 725 // This tests will make a complete PeerConnection-based call, verify that
713 // video is playing for the call, and verify that a non-empty AEC dump file 726 // video is playing for the call, and verify that a non-empty AEC dump file
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
776 EXPECT_TRUE(base::PathExists(dump_file)); 789 EXPECT_TRUE(base::PathExists(dump_file));
777 int64 file_size = 0; 790 int64 file_size = 0;
778 EXPECT_TRUE(base::GetFileSize(dump_file, &file_size)); 791 EXPECT_TRUE(base::GetFileSize(dump_file, &file_size));
779 EXPECT_EQ(0, file_size); 792 EXPECT_EQ(0, file_size);
780 793
781 base::DeleteFile(dump_file, false); 794 base::DeleteFile(dump_file, false);
782 } 795 }
783 796
784 797
785 } // namespace content 798 } // namespace content
OLDNEW
« no previous file with comments | « chrome/browser/media/chrome_webrtc_browsertest.cc ('k') | content/test/data/media/peerconnection-call.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698