OLD | NEW |
---|---|
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 | 2 |
3 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 3 # Copyright (c) 2011 The Chromium Authors. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 """A framework to run PyAuto HTML media tests. | 7 """A framework to run PyAuto HTML media tests. |
8 | 8 |
9 This PyAuto powered script plays media (video or audio) files (using the HTML5 | 9 This PyAuto powered script plays media (video or audio) files (using the HTML5 |
10 tag embedded in an HTML file). The parameters needed to run this test are | 10 tag embedded in an HTML file). The parameters needed to run this test are |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
186 | 186 |
187 def PreEachRunProcess(self, run_counter): | 187 def PreEachRunProcess(self, run_counter): |
188 """A method to execute before each run. | 188 """A method to execute before each run. |
189 | 189 |
190 The default behavior is to record start time. | 190 The default behavior is to record start time. |
191 | 191 |
192 Args: | 192 Args: |
193 run_counter: counter for each run. | 193 run_counter: counter for each run. |
194 """ | 194 """ |
195 self.start = time.time() | 195 self.start = time.time() |
196 if eval(os.getenv(MediaTestEnvNames.REFERENCE_BUILD_ENV_NAME)): | |
dennis_jeffrey
2011/05/19 01:20:13
(optional) I recommend adding a comment here that
Nirnimesh
2011/05/19 06:40:20
Why do you need to eval it anyway?
Why not assume
imasaki1
2011/05/20 05:12:01
Changed based on Nirnimesh comments.
imasaki1
2011/05/20 05:12:01
Done.
Also change other boolean environment valua
| |
197 self.current_trace_type = 't_ref' | |
196 | 198 |
197 def PostEachRunProcess(self, run_counter): | 199 def PostEachRunProcess(self, run_counter): |
198 """A method to execute after each run. | 200 """A method to execute after each run. |
199 | 201 |
200 The default behavior is to do nothing. | 202 The default behavior is to do nothing. |
201 | 203 |
202 Args: | 204 Args: |
203 run_counter: counter for each run. | 205 run_counter: counter for each run. |
204 """ | 206 """ |
205 pass | 207 pass |
206 | 208 |
207 def GetPlayerHTMLFileName(self): | 209 def GetPlayerHTMLFileName(self): |
208 """A method to get the player HTML file name.""" | 210 """A method to get the player HTML file name.""" |
209 return 'media_playback.html' | 211 return 'media_playback.html' |
210 | 212 |
211 | 213 |
212 if __name__ == '__main__': | 214 if __name__ == '__main__': |
213 pyauto_media.Main() | 215 pyauto_media.Main() |
OLD | NEW |