Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(255)

Side by Side Diff: chrome/test/functional/media/mixed_audio_latency_perf.py

Issue 222873002: Remove pyauto tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: sync Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
5
6 """Audio latency performance test.
7
8 Benchmark measuring how fast we can continuously repeat a short sound
9 clip, while another clip is running in the background. In the ideal
10 scenario we'd have zero latency processing script, seeking back to the
11 beginning of the clip, and resuming audio playback.
12
13 Performance is recorded as the average latency of N playbacks. I.e., if we play
14 a clip 50 times and the ideal duration of all playbacks is 1000ms and the total
15 duration is 1500ms, the recorded result is (1500ms - 1000ms) / 50 == 10ms.
16 """
17 import os
18
19 import pyauto_media
20 import pyauto_utils
21 import pyauto
22
23
24 # HTML test path; relative to src/chrome/test/data.
25 _TEST_HTML_PATH = os.path.join('media', 'html', 'mixed_audio_latency_perf.html')
26
27
28 class MixedAudioLatencyPerfTest(pyauto.PyUITest):
29 """PyAuto test container. See file doc string for more information."""
30
31 def testAudioLatency(self):
32 """Launches HTML test which runs the audio latency test."""
33 self.NavigateToURL(self.GetFileURLForDataPath(_TEST_HTML_PATH))
34
35 # Block until the test finishes and notifies us.
36 self.assertTrue(self.ExecuteJavascript('startTest();'))
37 latency = float(self.GetDOMValue('averageLatency'))
38 pyauto_utils.PrintPerfResult('audio_latency', 'latency_bg_clip', latency,
39 'ms')
40
41
42 if __name__ == '__main__':
43 pyauto_media.Main()
OLDNEW
« no previous file with comments | « chrome/test/functional/media/media_stat_perf.py ('k') | chrome/test/functional/media/pyauto_media.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698