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

Side by Side Diff: chrome/browser/media/webrtc/webrtc_audio_quality_browsertest.cc

Issue 2318033002: c/browser, c/common, components M-N: Change ScopedTempDir::path() to GetPath() (Closed)
Patch Set: Fix ItunesFileUtilTest Created 4 years, 3 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 <ctime> 7 #include <ctime>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/files/file_enumerator.h" 10 #include "base/files/file_enumerator.h"
(...skipping 759 matching lines...) Expand 10 before | Expand all | Expand 10 after
770 test::GetReferenceFilesDir().Append(reference_filename); 770 test::GetReferenceFilesDir().Append(reference_filename);
771 base::FilePath recording = CreateTemporaryWaveFile(); 771 base::FilePath recording = CreateTemporaryWaveFile();
772 772
773 ASSERT_NO_FATAL_FAILURE(SetupAndRecordAudioCall( 773 ASSERT_NO_FATAL_FAILURE(SetupAndRecordAudioCall(
774 reference_file, recording, constraints, 774 reference_file, recording, constraints,
775 base::TimeDelta::FromSeconds(30))); 775 base::TimeDelta::FromSeconds(30)));
776 776
777 base::ScopedTempDir split_ref_files; 777 base::ScopedTempDir split_ref_files;
778 ASSERT_TRUE(split_ref_files.CreateUniqueTempDir()); 778 ASSERT_TRUE(split_ref_files.CreateUniqueTempDir());
779 ASSERT_NO_FATAL_FAILURE( 779 ASSERT_NO_FATAL_FAILURE(
780 SplitFileOnSilenceIntoDir(reference_file, split_ref_files.path())); 780 SplitFileOnSilenceIntoDir(reference_file, split_ref_files.GetPath()));
781 std::vector<base::FilePath> ref_segments = 781 std::vector<base::FilePath> ref_segments =
782 ListWavFilesInDir(split_ref_files.path()); 782 ListWavFilesInDir(split_ref_files.GetPath());
783 783
784 base::ScopedTempDir split_actual_files; 784 base::ScopedTempDir split_actual_files;
785 ASSERT_TRUE(split_actual_files.CreateUniqueTempDir()); 785 ASSERT_TRUE(split_actual_files.CreateUniqueTempDir());
786 ASSERT_NO_FATAL_FAILURE( 786 ASSERT_NO_FATAL_FAILURE(
787 SplitFileOnSilenceIntoDir(recording, split_actual_files.path())); 787 SplitFileOnSilenceIntoDir(recording, split_actual_files.GetPath()));
788 788
789 // Keep the recording and split files if the analysis fails. 789 // Keep the recording and split files if the analysis fails.
790 base::FilePath actual_files_dir = split_actual_files.Take(); 790 base::FilePath actual_files_dir = split_actual_files.Take();
791 std::vector<base::FilePath> actual_segments = 791 std::vector<base::FilePath> actual_segments =
792 ListWavFilesInDir(actual_files_dir); 792 ListWavFilesInDir(actual_files_dir);
793 793
794 AnalyzeSegmentsAndPrintResult( 794 AnalyzeSegmentsAndPrintResult(
795 ref_segments, actual_segments, reference_file, perf_modifier); 795 ref_segments, actual_segments, reference_file, perf_modifier);
796 796
797 DeleteFileUnlessTestFailed(recording, false); 797 DeleteFileUnlessTestFailed(recording, false);
798 DeleteFileUnlessTestFailed(actual_files_dir, true); 798 DeleteFileUnlessTestFailed(actual_files_dir, true);
799 } 799 }
800 800
801 // The AGC should apply non-zero gain here. 801 // The AGC should apply non-zero gain here.
802 IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcAudioQualityBrowserTest, 802 IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcAudioQualityBrowserTest,
803 MANUAL_TestAutoGainControlOnLowAudio) { 803 MANUAL_TestAutoGainControlOnLowAudio) {
804 ASSERT_NO_FATAL_FAILURE(TestAutoGainControl( 804 ASSERT_NO_FATAL_FAILURE(TestAutoGainControl(
805 kReferenceFile, kAudioOnlyCallConstraints, "_with_agc")); 805 kReferenceFile, kAudioOnlyCallConstraints, "_with_agc"));
806 } 806 }
807 807
808 // Since the AGC is off here there should be no gain at all. 808 // Since the AGC is off here there should be no gain at all.
809 IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcAudioQualityBrowserTest, 809 IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcAudioQualityBrowserTest,
810 MANUAL_TestAutoGainIsOffWithAudioProcessingOff) { 810 MANUAL_TestAutoGainIsOffWithAudioProcessingOff) {
811 const char* kAudioCallWithoutAudioProcessing = 811 const char* kAudioCallWithoutAudioProcessing =
812 "{audio: { mandatory: { echoCancellation: false } } }"; 812 "{audio: { mandatory: { echoCancellation: false } } }";
813 ASSERT_NO_FATAL_FAILURE(TestAutoGainControl( 813 ASSERT_NO_FATAL_FAILURE(TestAutoGainControl(
814 kReferenceFile, kAudioCallWithoutAudioProcessing, "_no_agc")); 814 kReferenceFile, kAudioCallWithoutAudioProcessing, "_no_agc"));
815 } 815 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698