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

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

Issue 11225069: Fix naming issue on media basic playback test. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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
« no previous file with comments | « chrome/test/functional/PYAUTO_TESTS ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 """Basic playback test. Checks playback, seek, and replay based on events. 6 """Basic playback test. Checks playback, seek, and replay based on events.
7 7
8 This test uses the bear videos from the test matrix in h264, vp8, and theora 8 This test uses the bear videos from the test matrix in h264, vp8, and theora
9 formats. 9 formats.
10 """ 10 """
(...skipping 14 matching lines...) Expand all
25 pyauto.PyUITest.GetFileURLForContentDataPath('media', name) 25 pyauto.PyUITest.GetFileURLForContentDataPath('media', name)
26 for name in ['bear.mp4', 'bear.ogv', 'bear.webm', 'bear_silent.mp4', 26 for name in ['bear.mp4', 'bear.ogv', 'bear.webm', 'bear_silent.mp4',
27 'bear_silent.ogv', 'bear_silent.webm']] 27 'bear_silent.ogv', 'bear_silent.webm']]
28 28
29 # Expected events for the first iteration and every iteration thereafter. 29 # Expected events for the first iteration and every iteration thereafter.
30 _EXPECTED_EVENTS_0 = [('ended', 2), ('playing', 2), ('seeked', 1), 30 _EXPECTED_EVENTS_0 = [('ended', 2), ('playing', 2), ('seeked', 1),
31 ('suspend', 1)] 31 ('suspend', 1)]
32 _EXPECTED_EVENTS_n = [('abort', 1), ('emptied', 1)] + _EXPECTED_EVENTS_0 32 _EXPECTED_EVENTS_n = [('abort', 1), ('emptied', 1)] + _EXPECTED_EVENTS_0
33 33
34 34
35 class MediaConstrainedNetworkPerfTest(pyauto.PyUITest): 35 class MediaBasicPlaybackTest(pyauto.PyUITest):
36 """PyAuto test container. See file doc string for more information.""" 36 """PyAuto test container. See file doc string for more information."""
37 37
38 def ExtraChromeFlags(self): 38 def ExtraChromeFlags(self):
39 """Run with --disable-audio to avoid issues with bots with no audio output. 39 """Run with --disable-audio to avoid issues with bots with no audio output.
40 40
41 TODO(shadi): Remove extra flag once issue (crbug.com/120749) is resolved. 41 TODO(shadi): Remove extra flag once issue (crbug.com/120749) is resolved.
42 """ 42 """
43 return pyauto.PyUITest.ExtraChromeFlags(self) + ['--disable-audio'] 43 return pyauto.PyUITest.ExtraChromeFlags(self) + ['--disable-audio']
44 44
45 def testBasicPlaybackMatrix(self): 45 def testBasicPlaybackMatrix(self):
(...skipping 30 matching lines...) Expand all
76 else: 76 else:
77 self.assertEqual(counts, _EXPECTED_EVENTS_n) 77 self.assertEqual(counts, _EXPECTED_EVENTS_n)
78 except: 78 except:
79 logging.debug( 79 logging.debug(
80 'Test failed with events: %s', self.GetDOMValue("events.join(',')")) 80 'Test failed with events: %s', self.GetDOMValue("events.join(',')"))
81 raise 81 raise
82 82
83 83
84 if __name__ == '__main__': 84 if __name__ == '__main__':
85 pyauto_media.Main() 85 pyauto_media.Main()
OLDNEW
« no previous file with comments | « chrome/test/functional/PYAUTO_TESTS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698