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

Side by Side Diff: Tools/Scripts/webkitpy/layout_tests/port/browser_test_driver.py

Issue 546133003: Reformat webkitpy.layout_tests w/ format-webkitpy. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 3 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) 2014 Google Inc. All rights reserved. 1 # Copyright (C) 2014 Google Inc. All rights reserved.
2 # 2 #
3 # Redistribution and use in source and binary forms, with or without 3 # Redistribution and use in source and binary forms, with or without
4 # modification, are permitted provided that the following conditions are 4 # modification, are permitted provided that the following conditions are
5 # met: 5 # met:
6 # 6 #
7 # * Redistributions of source code must retain the above copyright 7 # * Redistributions of source code must retain the above copyright
8 # notice, this list of conditions and the following disclaimer. 8 # notice, this list of conditions and the following disclaimer.
9 # * Redistributions in binary form must reproduce the above 9 # * Redistributions in binary form must reproduce the above
10 # copyright notice, this list of conditions and the following disclaimer 10 # copyright notice, this list of conditions and the following disclaimer
(...skipping 14 matching lines...) Expand all
25 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 28
29 from webkitpy.layout_tests.port import driver 29 from webkitpy.layout_tests.port import driver
30 import time 30 import time
31 import shutil 31 import shutil
32 32
33 33
34 class BrowserTestDriver(driver.Driver): 34 class BrowserTestDriver(driver.Driver):
35
35 """Object for running print preview test(s) using browser_tests.""" 36 """Object for running print preview test(s) using browser_tests."""
37
36 def __init__(self, port, worker_number, pixel_tests, no_timeout=False): 38 def __init__(self, port, worker_number, pixel_tests, no_timeout=False):
37 """Invokes the constructor of driver.Driver.""" 39 """Invokes the constructor of driver.Driver."""
38 super(BrowserTestDriver, self).__init__(port, worker_number, pixel_tests , no_timeout) 40 super(BrowserTestDriver, self).__init__(port, worker_number, pixel_tests , no_timeout)
39 41
40 def start(self, pixel_tests, per_test_args, deadline): 42 def start(self, pixel_tests, per_test_args, deadline):
41 """Same as Driver.start() however, it has an extra step. It waits for 43 """Same as Driver.start() however, it has an extra step. It waits for
42 a path to a file to be used for stdin to be printed by the browser test. 44 a path to a file to be used for stdin to be printed by the browser test.
43 If a path is found by the deadline test test will open the file and 45 If a path is found by the deadline test test will open the file and
44 assign it to the stdin of the process that is owned by this driver's 46 assign it to the stdin of the process that is owned by this driver's
45 server process. 47 server process.
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 cmd.append('--run-manual') 84 cmd.append('--run-manual')
83 cmd.append('--single_process') 85 cmd.append('--single_process')
84 cmd.extend(per_test_args) 86 cmd.extend(per_test_args)
85 cmd.extend(self._port.get_option('additional_drt_flag', [])) 87 cmd.extend(self._port.get_option('additional_drt_flag', []))
86 return cmd 88 return cmd
87 89
88 def stop(self): 90 def stop(self):
89 if self._server_process: 91 if self._server_process:
90 self._server_process.write('QUIT') 92 self._server_process.write('QUIT')
91 super(BrowserTestDriver, self).stop(self._port.driver_stop_timeout()) 93 super(BrowserTestDriver, self).stop(self._port.driver_stop_timeout())
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698