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

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: 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 783 matching lines...) Expand 10 before | Expand all | Expand 10 after
794 manager->SetGenerateStreamCallbackForTesting( 794 manager->SetGenerateStreamCallbackForTesting(
795 base::Bind(&VerifyDisableLocalEcho, true)); 795 base::Bind(&VerifyDisableLocalEcho, true));
796 call = GenerateGetUserMediaWithDisableLocalEcho( 796 call = GenerateGetUserMediaWithDisableLocalEcho(
797 "getUserMediaAndExpectSuccess", "true"); 797 "getUserMediaAndExpectSuccess", "true");
798 ExecuteJavascriptAndWaitForOk(call); 798 ExecuteJavascriptAndWaitForOk(call);
799 799
800 manager->SetGenerateStreamCallbackForTesting( 800 manager->SetGenerateStreamCallbackForTesting(
801 MediaStreamManager::GenerateStreamTestCallback()); 801 MediaStreamManager::GenerateStreamTestCallback());
802 } 802 }
803 803
804 IN_PROC_BROWSER_TEST_F(WebRtcGetUserMediaBrowserTest, GetAudioSettingsDefault) {
805 ASSERT_TRUE(embedded_test_server()->Start());
806 GURL url(embedded_test_server()->GetURL("/media/getusermedia.html"));
807 NavigateToURL(shell(), url);
808 ExecuteJavascriptAndWaitForOk("GetAudioSettingsDefault()");
hbos_chromium 2017/07/04 15:26:48 JS function names should be lowerCamelCase.
Guido Urdaneta 2017/07/05 09:23:36 Done.
809 }
810
811 IN_PROC_BROWSER_TEST_F(WebRtcGetUserMediaBrowserTest,
812 GetAudioSettingsNoEchoCancellation) {
813 ASSERT_TRUE(embedded_test_server()->Start());
814 GURL url(embedded_test_server()->GetURL("/media/getusermedia.html"));
815 NavigateToURL(shell(), url);
816 ExecuteJavascriptAndWaitForOk("GetAudioSettingsNoEchoCancellation()");
817 }
818
819 IN_PROC_BROWSER_TEST_F(WebRtcGetUserMediaBrowserTest,
820 GetAudioSettingsDeviceId) {
821 ASSERT_TRUE(embedded_test_server()->Start());
822 GURL url(embedded_test_server()->GetURL("/media/getusermedia.html"));
823 NavigateToURL(shell(), url);
824 ExecuteJavascriptAndWaitForOk("GetAudioSettingsDeviceId()");
825 }
826
804 // TODO(guidou): Remove this test. http://crbug.com/706408 827 // TODO(guidou): Remove this test. http://crbug.com/706408
805 class WebRtcGetUserMediaOldConstraintsBrowserTest 828 class WebRtcGetUserMediaOldConstraintsBrowserTest
806 : public WebRtcContentBrowserTestBase { 829 : public WebRtcContentBrowserTestBase {
807 public: 830 public:
808 WebRtcGetUserMediaOldConstraintsBrowserTest() : trace_log_(NULL) { 831 WebRtcGetUserMediaOldConstraintsBrowserTest() : trace_log_(NULL) {
809 scoped_feature_list_.InitWithFeatures( 832 scoped_feature_list_.InitWithFeatures(
810 {features::kMediaStreamOldVideoConstraints, 833 {features::kMediaStreamOldVideoConstraints,
811 features::kMediaStreamOldAudioConstraints}, 834 features::kMediaStreamOldAudioConstraints},
812 {}); 835 {});
813 // Automatically grant device permission. 836 // Automatically grant device permission.
(...skipping 695 matching lines...) Expand 10 before | Expand all | Expand 10 after
1509 "failTestAfterTimeout('Got no unmute event', 1500);")); 1532 "failTestAfterTimeout('Got no unmute event', 1500);"));
1510 1533
1511 // Mute 1534 // Mute
1512 media::FakeAudioInputStream::SetGlobalMutedState(true); 1535 media::FakeAudioInputStream::SetGlobalMutedState(true);
1513 EXPECT_EQ("onmute: muted=true, readyState=live", 1536 EXPECT_EQ("onmute: muted=true, readyState=live",
1514 ExecuteJavascriptAndReturnResult( 1537 ExecuteJavascriptAndReturnResult(
1515 "failTestAfterTimeout('Got no mute event', 1500);")); 1538 "failTestAfterTimeout('Got no mute event', 1500);"));
1516 } 1539 }
1517 1540
1518 } // namespace content 1541 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698