| OLD | NEW |
| 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 <ctime> | 5 #include <ctime> |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/files/file_util.h" | 8 #include "base/files/file_util.h" |
| 9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
| 10 #include "base/process/launch.h" | 10 #include "base/process/launch.h" |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 // 4. In the Listen tab for the mix device, check the 'listen to this device' | 102 // 4. In the Listen tab for the mix device, check the 'listen to this device' |
| 103 // checkbox. Ensure the mix device is the default recording device. | 103 // checkbox. Ensure the mix device is the default recording device. |
| 104 // 5. Launch chrome and try playing a video with sound. You should see | 104 // 5. Launch chrome and try playing a video with sound. You should see |
| 105 // in the volume meter for the mix device. Configure the mix device to have | 105 // in the volume meter for the mix device. Configure the mix device to have |
| 106 // 50 / 100 in level. Also go into the playback tab, right-click Speakers, | 106 // 50 / 100 in level. Also go into the playback tab, right-click Speakers, |
| 107 // and set that level to 50 / 100. Otherwise you will get distortion in | 107 // and set that level to 50 / 100. Otherwise you will get distortion in |
| 108 // the recording. | 108 // the recording. |
| 109 class WebRtcAudioQualityBrowserTest : public WebRtcTestBase { | 109 class WebRtcAudioQualityBrowserTest : public WebRtcTestBase { |
| 110 public: | 110 public: |
| 111 WebRtcAudioQualityBrowserTest() {} | 111 WebRtcAudioQualityBrowserTest() {} |
| 112 virtual void SetUpInProcessBrowserTestFixture() override { | 112 void SetUpInProcessBrowserTestFixture() override { |
| 113 DetectErrorsInJavaScript(); // Look for errors in our rather complex js. | 113 DetectErrorsInJavaScript(); // Look for errors in our rather complex js. |
| 114 } | 114 } |
| 115 | 115 |
| 116 virtual void SetUpCommandLine(CommandLine* command_line) override { | 116 void SetUpCommandLine(CommandLine* command_line) override { |
| 117 // This test expects real device handling and requires a real webcam / audio | 117 // This test expects real device handling and requires a real webcam / audio |
| 118 // device; it will not work with fake devices. | 118 // device; it will not work with fake devices. |
| 119 EXPECT_FALSE(command_line->HasSwitch( | 119 EXPECT_FALSE(command_line->HasSwitch( |
| 120 switches::kUseFakeDeviceForMediaStream)); | 120 switches::kUseFakeDeviceForMediaStream)); |
| 121 EXPECT_FALSE(command_line->HasSwitch( | 121 EXPECT_FALSE(command_line->HasSwitch( |
| 122 switches::kUseFakeUIForMediaStream)); | 122 switches::kUseFakeUIForMediaStream)); |
| 123 } | 123 } |
| 124 | 124 |
| 125 void AddAudioFile(const std::string& input_file_relative_url, | 125 void AddAudioFile(const std::string& input_file_relative_url, |
| 126 content::WebContents* tab_contents) { | 126 content::WebContents* tab_contents) { |
| (...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 469 test::GetReferenceFilesDir().Append(kReferenceFile); | 469 test::GetReferenceFilesDir().Append(kReferenceFile); |
| 470 ASSERT_TRUE(RunPesq(reference_file_in_test_dir, trimmed_recording, 16000, | 470 ASSERT_TRUE(RunPesq(reference_file_in_test_dir, trimmed_recording, 16000, |
| 471 &raw_mos, &mos_lqo)); | 471 &raw_mos, &mos_lqo)); |
| 472 | 472 |
| 473 perf_test::PrintResult("audio_pesq", "", "raw_mos", raw_mos, "score", true); | 473 perf_test::PrintResult("audio_pesq", "", "raw_mos", raw_mos, "score", true); |
| 474 perf_test::PrintResult("audio_pesq", "", "mos_lqo", mos_lqo, "score", true); | 474 perf_test::PrintResult("audio_pesq", "", "mos_lqo", mos_lqo, "score", true); |
| 475 | 475 |
| 476 EXPECT_TRUE(base::DeleteFile(recording, false)); | 476 EXPECT_TRUE(base::DeleteFile(recording, false)); |
| 477 EXPECT_TRUE(base::DeleteFile(trimmed_recording, false)); | 477 EXPECT_TRUE(base::DeleteFile(trimmed_recording, false)); |
| 478 } | 478 } |
| OLD | NEW |