summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorphoglund@chromium.org <phoglund@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-07 14:53:41 +0000
committerphoglund@chromium.org <phoglund@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-07 14:53:41 +0000
commitd05fc18734c7ddc356235fe947db9170cd67c4a1 (patch)
tree981156920d64e28c15191be47d18a1573d29d0fd
parentaacc191559fb94b60b01e8ee7f1aab5c6e546cf4 (diff)
downloadchromium_src-d05fc18734c7ddc356235fe947db9170cd67c4a1.zip
chromium_src-d05fc18734c7ddc356235fe947db9170cd67c4a1.tar.gz
chromium_src-d05fc18734c7ddc356235fe947db9170cd67c4a1.tar.bz2
Deleted the unstable not-silent audio test, moved the quality test to the quality suite.
TBR=dennisjeffrey@chromium.org NOTRY=True BUG= Review URL: https://chromiumcodereview.appspot.com/12566006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@186716 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/test/functional/PYAUTO_TESTS19
-rwxr-xr-xchrome/test/functional/webrtc_audio_quality.py (renamed from chrome/test/functional/webrtc_audio_call.py)46
2 files changed, 10 insertions, 55 deletions
diff --git a/chrome/test/functional/PYAUTO_TESTS b/chrome/test/functional/PYAUTO_TESTS
index 6019125..0db6556 100644
--- a/chrome/test/functional/PYAUTO_TESTS
+++ b/chrome/test/functional/PYAUTO_TESTS
@@ -498,20 +498,13 @@
},
# WebRTC MediaStream tests. Requires webcam and audio device to be present on
- # the test machine. The webrtc_audio_call test requires additional
- # configuration as described in the test's class comments.
+ # the test machine.
'WEBRTC': {
'all': [
'media_stream_infobar',
'webrtc_brutality_test',
'webrtc_call',
],
- 'linux': [
- 'webrtc_audio_call',
- ],
- 'win': [
- 'webrtc_audio_call.testWebrtcAudioCallAndMeasureQuality',
- ],
},
# WebRTC / AppRTC Integration tests.
@@ -521,11 +514,17 @@
],
},
- # WebRTC quality tests. Requires webcam, an audio device and a special setup
- # where the webcam is playing a barcode-encoded video.
+ # WebRTC quality tests. The video quality test requires a webcam, an audio
+ # device and a special setup where the webcam plays a barcode-encoded video.
+ # The webrtc_audio_quality test requires additional configuration as described
+ # in the test's class comments.
'WEBRTC_QUALITY': {
'all': [
'webrtc_video_quality',
+ 'webrtc_audio_quality',
+ ],
+ 'mac': [
+ '-webrtc_audio_quality', # Not implemented.
],
},
diff --git a/chrome/test/functional/webrtc_audio_call.py b/chrome/test/functional/webrtc_audio_quality.py
index a9ba7e9..1064936 100755
--- a/chrome/test/functional/webrtc_audio_call.py
+++ b/chrome/test/functional/webrtc_audio_quality.py
@@ -20,10 +20,9 @@ _MEDIA_PATH = os.path.abspath(os.path.join(pyauto.PyUITest.DataDir(),
_REFERENCE_FILE = os.path.join(_MEDIA_PATH, 'human-voice.wav')
_JAVASCRIPT_PATH = os.path.abspath(os.path.join(pyauto.PyUITest.DataDir(),
'webrtc'))
-_SIZE_OF_EMPTY_WAV_FILE_BYTES = 44
-class WebrtcAudioCallTest(webrtc_test_base.WebrtcTestBase):
+class WebrtcAudioQualityTest(webrtc_test_base.WebrtcTestBase):
"""Test we can set up a WebRTC call and play audio through it.
This test will only work on machines that have been configured to record their
@@ -64,33 +63,6 @@ class WebrtcAudioCallTest(webrtc_test_base.WebrtcTestBase):
pyauto.PyUITest.tearDown(self)
self.assertEquals('', self.CheckErrorsAndCrashes())
- def testWebrtcAudioCallAndVerifyAudioIsPlaying(self):
- """Test that WebRTC is capable of transmitting at least some audio.
-
- This test has some nontrivial prerequisites:
- The target system must have an active microphone, it must be selected
- as default input for the user that runs the test, and it must record a
- certain minimum level of ambient noise (for instance server fans).
- Verify that you are getting ambient noise in the microphone by either
- recording it directly or checking your OS' microphone settings. Amplify
- the microphone if the background noise is too low. The microphone should
- capture noise consistently above 5% of its total range.
- """
- self.assertTrue(self.IsLinux(), msg='Only supported on Linux.')
-
- def CallWithMic():
- self._AudioCallWithGetUserMedia(duration_seconds=5)
-
- def EnsureNotAllSilent(output_no_silence):
- self.assertTrue(os.path.getsize(output_no_silence) >
- _SIZE_OF_EMPTY_WAV_FILE_BYTES,
- msg=('The test recorded only silence. Ensure your '
- 'machine is correctly configured for this test.'))
-
- self._RecordAndVerify(record_duration_seconds=10,
- sound_producing_function=CallWithMic,
- verification_function=EnsureNotAllSilent)
-
def testWebrtcAudioCallAndMeasureQuality(self):
"""Measures how much WebRTC distorts speech.
@@ -128,22 +100,6 @@ class WebrtcAudioCallTest(webrtc_test_base.WebrtcTestBase):
sound_producing_function=CallWithWebAudio,
verification_function=MeasureQuality)
- def _AudioCallWithGetUserMedia(self, duration_seconds):
- self.LoadTestPageInTwoTabs()
-
- # This sets up a audio-only call.
- self.assertEquals('ok-got-stream', self.GetUserMedia(tab_index=0,
- request_video=False))
- self.assertEquals('ok-got-stream', self.GetUserMedia(tab_index=1,
- request_video=False))
- self.Connect('user_1', tab_index=0)
- self.Connect('user_2', tab_index=1)
-
- self.CreatePeerConnection(tab_index=0)
- self.AddUserMediaLocalStream(tab_index=0)
-
- self._CallAndRunFor(duration_seconds)
-
def _AudioCallWithWebAudio(self, duration_seconds, input_relative_path):
self.LoadTestPageInTwoTabs(test_page='webrtc_audio_quality_test.html');