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

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

Issue 10825051: Update CNS to run on chromeperf34 and CNS tests to run on windows perf_av bot. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 4 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
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Seek performance testing for <video>. 6 """Seek performance testing for <video>.
7 7
8 Calculates the short and long seek times for different video formats on 8 Calculates the short and long seek times for different video formats on
9 different network constraints. 9 different network constraints.
10 """ 10 """
11 11
12 import logging 12 import logging
13 import os 13 import os
14 import posixpath
14 15
15 import pyauto_media 16 import pyauto_media
16 import pyauto_utils 17 import pyauto_utils
17 18
18 import cns_test_base 19 import cns_test_base
19 import worker_thread 20 import worker_thread
20 21
21 # Number of threads to use during testing. 22 # Number of threads to use during testing.
22 _TEST_THREADS = 3 23 _TEST_THREADS = 3
23 24
24 # HTML test path; relative to src/chrome/test/data. 25 # HTML test path; relative to src/chrome/test/data.
25 _TEST_HTML_PATH = os.path.join('media', 'html', 'media_seek.html') 26 _TEST_HTML_PATH = os.path.join('media', 'html', 'media_seek.html')
26 27
27 # The media files used for testing. 28 # The media files used for testing.
28 # Path under CNS root folder (pyauto_private/media). 29 # Path under CNS root folder (pyauto_private/media).
29 _TEST_VIDEOS = [os.path.join('dartmoor', name) for name in 30 _TEST_VIDEOS = [posixpath.join('dartmoor', name) for name in
30 ['dartmoor2.ogg', 'dartmoor2.m4a', 'dartmoor2.mp3', 31 ['dartmoor2.ogg', 'dartmoor2.m4a', 'dartmoor2.mp3',
31 'dartmoor2.wav']] 32 'dartmoor2.wav']]
32 _TEST_VIDEOS.extend(os.path.join('crowd', name) for name in 33 _TEST_VIDEOS.extend(posixpath.join('crowd', name) for name in
33 ['crowd1080.webm', 'crowd1080.ogv', 'crowd1080.mp4', 34 ['crowd1080.webm', 'crowd1080.ogv', 'crowd1080.mp4',
34 'crowd360.webm', 'crowd360.ogv', 'crowd360.mp4']) 35 'crowd360.webm', 'crowd360.ogv', 'crowd360.mp4'])
35 36
36 # Constraints to run tests on. 37 # Constraints to run tests on.
37 _TESTS_TO_RUN = [ 38 _TESTS_TO_RUN = [
38 cns_test_base.Cable, 39 cns_test_base.Cable,
39 cns_test_base.Wifi, 40 cns_test_base.Wifi,
40 cns_test_base.NoConstraints] 41 cns_test_base.NoConstraints]
41 42
42 43
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 def testMediaSeekPerformance(self): 109 def testMediaSeekPerformance(self):
109 """Launches HTML test which plays each video and records seek stats.""" 110 """Launches HTML test which plays each video and records seek stats."""
110 tasks = cns_test_base.CreateCNSPerfTasks(_TESTS_TO_RUN, _TEST_VIDEOS) 111 tasks = cns_test_base.CreateCNSPerfTasks(_TESTS_TO_RUN, _TEST_VIDEOS)
111 if worker_thread.RunWorkerThreads(self, SeekWorkerThread, tasks, 112 if worker_thread.RunWorkerThreads(self, SeekWorkerThread, tasks,
112 _TEST_THREADS, _TEST_HTML_PATH): 113 _TEST_THREADS, _TEST_HTML_PATH):
113 self.fail('Some tests failed to run as expected.') 114 self.fail('Some tests failed to run as expected.')
114 115
115 116
116 if __name__ == '__main__': 117 if __name__ == '__main__':
117 pyauto_media.Main() 118 pyauto_media.Main()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698