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/webrtc@6123 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/voice_engine/test/auto_test/standard/volume_test.cc b/voice_engine/test/auto_test/standard/volume_test.cc
index efa7b5f..e4a9bd2 100644
--- a/voice_engine/test/auto_test/standard/volume_test.cc
+++ b/voice_engine/test/auto_test/standard/volume_test.cc
@@ -95,10 +95,12 @@
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(