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

Side by Side Diff: client/site_tests/graphics_TearTest/graphics_TearTest.py

Issue 5740004: Move site_chrome_test, site_logging, site_log_reader, site_crash_test into cros dir. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/autotest.git@master
Patch Set: patch Created 9 years, 11 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
1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import logging, os 5 import logging, os
6 6
7 from autotest_lib.client.bin import utils 7 from autotest_lib.client.bin import utils
8 from autotest_lib.client.common_lib import error 8 from autotest_lib.client.common_lib import error
9 from autotest_lib.client.cros import ui, ui_test 9 from autotest_lib.client.cros import cros_ui_test, ui
10 10
11 11
12 def html_button(label, onclick=None): 12 def html_button(label, onclick=None):
13 return ('''<input type="button" value="%s" onclick="do_submit('%s')"/>''' % 13 return ('''<input type="button" value="%s" onclick="do_submit('%s')"/>''' %
14 (label, onclick if onclick else label)) 14 (label, onclick if onclick else label))
15 15
16 TEMPLATE = ''' 16 TEMPLATE = '''
17 <h5>{0}</h5> 17 <h5>{0}</h5>
18 <table> 18 <table>
19 <tr> <td>{1[0][desc]}</td> <td>{1[0][result]}</td> </tr> 19 <tr> <td>{1[0][desc]}</td> <td>{1[0][result]}</td> </tr>
20 <tr> <td>{1[1][desc]}</td> <td>{1[1][result]}</td> </tr> 20 <tr> <td>{1[1][desc]}</td> <td>{1[1][result]}</td> </tr>
21 <tr> <td>{1[2][desc]}</td> <td>{1[2][result]}</td> </tr> 21 <tr> <td>{1[2][desc]}</td> <td>{1[2][result]}</td> </tr>
22 </table> 22 </table>
23 ''' 23 '''
24 24
25 class graphics_TearTest(ui_test.UITest): 25 class graphics_TearTest(cros_ui_test.UITest):
26 version = 1 26 version = 1
27 27
28 28
29 def setup(self): 29 def setup(self):
30 self.job.setup_dep(['glbench']) 30 self.job.setup_dep(['glbench'])
31 31
32 32
33 def run_once(self): 33 def run_once(self):
34 dep = 'glbench' 34 dep = 'glbench'
35 dep_dir = os.path.join(self.autodir, 'deps', dep) 35 dep_dir = os.path.join(self.autodir, 'deps', dep)
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 result = dialog.get_result() 85 result = dialog.get_result()
86 86
87 # If user chose 'Restart', run the whole thing again. 87 # If user chose 'Restart', run the whole thing again.
88 if result != 'Restart': 88 if result != 'Restart':
89 break 89 break
90 90
91 if not passed: 91 if not passed:
92 raise error.TestFail('Failed: ' + 92 raise error.TestFail('Failed: ' +
93 ', '.join(test['desc'] for test in tests 93 ', '.join(test['desc'] for test in tests
94 if test['result'] != 'Pass')) 94 if test['result'] != 'Pass'))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698