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

Side by Side Diff: content/browser/webrtc/webrtc_getusermedia_browsertest.cc

Issue 2956063003: Add support for echoCancellation and deviceId to MediaStreamTrack.getSettings (Closed)
Patch Set: fix DCHECK Created 3 years, 5 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/feature_list.h" 8 #include "base/feature_list.h"
9 #include "base/json/json_reader.h" 9 #include "base/json/json_reader.h"
10 #include "base/memory/ref_counted_memory.h" 10 #include "base/memory/ref_counted_memory.h"
(...skipping 782 matching lines...) Expand 10 before | Expand all | Expand 10 after
793 manager->SetGenerateStreamCallbackForTesting( 793 manager->SetGenerateStreamCallbackForTesting(
794 base::Bind(&VerifyDisableLocalEcho, true)); 794 base::Bind(&VerifyDisableLocalEcho, true));
795 call = GenerateGetUserMediaWithDisableLocalEcho( 795 call = GenerateGetUserMediaWithDisableLocalEcho(
796 "getUserMediaAndExpectSuccess", "true"); 796 "getUserMediaAndExpectSuccess", "true");
797 ExecuteJavascriptAndWaitForOk(call); 797 ExecuteJavascriptAndWaitForOk(call);
798 798
799 manager->SetGenerateStreamCallbackForTesting( 799 manager->SetGenerateStreamCallbackForTesting(
800 MediaStreamManager::GenerateStreamTestCallback()); 800 MediaStreamManager::GenerateStreamTestCallback());
801 } 801 }
802 802
803 IN_PROC_BROWSER_TEST_F(WebRtcGetUserMediaBrowserTest, GetAudioSettingsDefault) {
804 ASSERT_TRUE(embedded_test_server()->Start());
805 GURL url(embedded_test_server()->GetURL("/media/getusermedia.html"));
806 NavigateToURL(shell(), url);
807 ExecuteJavascriptAndWaitForOk("getAudioSettingsDefault()");
808 }
809
810 IN_PROC_BROWSER_TEST_F(WebRtcGetUserMediaBrowserTest,
811 GetAudioSettingsNoEchoCancellation) {
812 ASSERT_TRUE(embedded_test_server()->Start());
813 GURL url(embedded_test_server()->GetURL("/media/getusermedia.html"));
814 NavigateToURL(shell(), url);
815 ExecuteJavascriptAndWaitForOk("getAudioSettingsNoEchoCancellation()");
816 }
817
818 IN_PROC_BROWSER_TEST_F(WebRtcGetUserMediaBrowserTest,
819 GetAudioSettingsDeviceId) {
820 ASSERT_TRUE(embedded_test_server()->Start());
821 GURL url(embedded_test_server()->GetURL("/media/getusermedia.html"));
822 NavigateToURL(shell(), url);
823 ExecuteJavascriptAndWaitForOk("getAudioSettingsDeviceId()");
824 }
825
803 // TODO(guidou): Remove this test. http://crbug.com/706408 826 // TODO(guidou): Remove this test. http://crbug.com/706408
804 class WebRtcGetUserMediaOldConstraintsBrowserTest 827 class WebRtcGetUserMediaOldConstraintsBrowserTest
805 : public WebRtcContentBrowserTestBase { 828 : public WebRtcContentBrowserTestBase {
806 public: 829 public:
807 WebRtcGetUserMediaOldConstraintsBrowserTest() : trace_log_(NULL) { 830 WebRtcGetUserMediaOldConstraintsBrowserTest() : trace_log_(NULL) {
808 scoped_feature_list_.InitAndEnableFeature( 831 scoped_feature_list_.InitAndEnableFeature(
809 features::kMediaStreamOldAudioConstraints); 832 features::kMediaStreamOldAudioConstraints);
810 // Automatically grant device permission. 833 // Automatically grant device permission.
811 AppendUseFakeUIForMediaStreamFlag(); 834 AppendUseFakeUIForMediaStreamFlag();
812 } 835 }
(...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after
1475 "failTestAfterTimeout('Got no unmute event', 1500);")); 1498 "failTestAfterTimeout('Got no unmute event', 1500);"));
1476 1499
1477 // Mute 1500 // Mute
1478 media::FakeAudioInputStream::SetGlobalMutedState(true); 1501 media::FakeAudioInputStream::SetGlobalMutedState(true);
1479 EXPECT_EQ("onmute: muted=true, readyState=live", 1502 EXPECT_EQ("onmute: muted=true, readyState=live",
1480 ExecuteJavascriptAndReturnResult( 1503 ExecuteJavascriptAndReturnResult(
1481 "failTestAfterTimeout('Got no mute event', 1500);")); 1504 "failTestAfterTimeout('Got no mute event', 1500);"));
1482 } 1505 }
1483 1506
1484 } // namespace content 1507 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698