| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 EXPECT_TRUE(could_get_mic_volume); | 166 EXPECT_TRUE(could_get_mic_volume); |
| 167 #endif | 167 #endif |
| 168 if (could_get_mic_volume) { | 168 if (could_get_mic_volume) { |
| 169 EXPECT_LE(volume, 255u); | 169 EXPECT_LE(volume, 255u); |
| 170 } else { | 170 } else { |
| 171 TEST_LOG("Failed to get the microphone volume."); | 171 TEST_LOG("Failed to get the microphone volume."); |
| 172 EXPECT_EQ(1000u, volume); | 172 EXPECT_EQ(1000u, volume); |
| 173 } | 173 } |
| 174 } | 174 } |
| 175 | 175 |
| 176 // The test below is disabled due to issue webrtc:6206. |
| 176 TEST_F(VolumeTest, DISABLED_ManualRequiresMicrophoneCanSetMicrophoneVolumeWithAg
cOff) { | 177 TEST_F(VolumeTest, DISABLED_ManualRequiresMicrophoneCanSetMicrophoneVolumeWithAg
cOff) { |
| 177 SwitchToManualMicrophone(); | 178 SwitchToManualMicrophone(); |
| 178 EXPECT_EQ(0, voe_apm_->SetAgcStatus(false)); | 179 EXPECT_EQ(0, voe_apm_->SetAgcStatus(false)); |
| 179 | 180 |
| 180 unsigned int original_volume = 0; | 181 unsigned int original_volume = 0; |
| 181 bool could_get_mic_volume = | 182 bool could_get_mic_volume = |
| 182 (voe_volume_control_->GetMicVolume(original_volume) == 0); | 183 (voe_volume_control_->GetMicVolume(original_volume) == 0); |
| 183 #if !defined(WEBRTC_LINUX) | 184 #if !defined(WEBRTC_LINUX) |
| 184 EXPECT_TRUE(could_get_mic_volume); | 185 EXPECT_TRUE(could_get_mic_volume); |
| 185 #endif | 186 #endif |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 Sleep(1000); | 293 Sleep(1000); |
| 293 | 294 |
| 294 // To finish, verify that the getter works. | 295 // To finish, verify that the getter works. |
| 295 float left = 0.0f; | 296 float left = 0.0f; |
| 296 float right = 0.0f; | 297 float right = 0.0f; |
| 297 | 298 |
| 298 EXPECT_EQ(0, voe_volume_control_->GetOutputVolumePan(channel_, left, right)); | 299 EXPECT_EQ(0, voe_volume_control_->GetOutputVolumePan(channel_, left, right)); |
| 299 EXPECT_FLOAT_EQ(0.1f, left); | 300 EXPECT_FLOAT_EQ(0.1f, left); |
| 300 EXPECT_FLOAT_EQ(0.8f, right); | 301 EXPECT_FLOAT_EQ(0.8f, right); |
| 301 } | 302 } |
| OLD | NEW |