Enables VolumeTest.DefaultMicrophoneVolumeIsAtMost255

Rewritten the test to only check for valid volume when we have actually received a value from the audio device. To check if we have actually received a volume value is out of the scope for this test.

BUG=webrtc:367
TESTED=trybots
R=tina.legrand@webrtc.org, xians@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/16499006

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6123 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
bjornv@webrtc.org
2014-05-13 14:14:56 +00:00
parent 93ec9c557b
commit 8d63d0ee70

View File

@ -95,10 +95,12 @@ TEST_F(VolumeTest, ManualSetVolumeWorks) {
Sleep(1000);
}
TEST_F(VolumeTest, DISABLED_ON_LINUX(DefaultMicrophoneVolumeIsAtMost255)) {
TEST_F(VolumeTest, DefaultMicrophoneVolumeIsAtMost255) {
unsigned int volume = 1000;
EXPECT_EQ(0, voe_volume_control_->GetMicVolume(volume));
EXPECT_LE(volume, 255u);
if (voe_volume_control_->GetMicVolume(volume) == 0)
EXPECT_LE(volume, 255u);
else
EXPECT_EQ(1000u, volume);
}
TEST_F(VolumeTest, DISABLED_ON_LINUX(