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

Unified Diff: Tools/Scripts/webkitpy/layout_tests/port/driver.py

Issue 378113003: Modifications to layout test framework so that it can work with browser_tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Layout test framework removes the temp directory that the browser test created. Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: Tools/Scripts/webkitpy/layout_tests/port/driver.py
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/driver.py b/Tools/Scripts/webkitpy/layout_tests/port/driver.py
index fda859e39504a2768fd9c4f1d080e9113edb698a..01118f6f3a6d40546448395fad9399fdc9486f95 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/driver.py
+++ b/Tools/Scripts/webkitpy/layout_tests/port/driver.py
@@ -150,7 +150,7 @@ class Driver(object):
Returns a DriverOutput object.
"""
start_time = time.time()
- self.start(driver_input.should_run_pixel_test, driver_input.args)
+ self.start(driver_input.should_run_pixel_test, driver_input.args, int(driver_input.timeout))
test_begin_time = time.time()
self.error_from_test = str()
self.err_seen_eof = False
@@ -265,7 +265,7 @@ class Driver(object):
return True
return False
- def start(self, pixel_tests, per_test_args):
+ def start(self, pixel_tests, per_test_args, deadline=0):
new_cmd_line = self.cmd_line(pixel_tests, per_test_args)
if not self._server_process or new_cmd_line != self._current_cmd_line:
self._start(pixel_tests, per_test_args)
@@ -415,6 +415,13 @@ class Driver(object):
return (block.decoded_content, block.content_hash)
return (None, block.content_hash)
+ def _read_stdin_path(self, deadline):
+ # returns (stdin_path, bool)
+ block = self._read_block(deadline)
+ if block.stdin_path:
+ return (block.stdin_path, True)
+ return (None, False)
+
def _read_header(self, block, line, header_text, header_attr, header_filter=None):
if line.startswith(header_text) and getattr(block, header_attr) is None:
value = line.split()[1]
@@ -430,7 +437,8 @@ class Driver(object):
or self._read_header(block, line, 'Content-Length: ', '_content_length', int)
or self._read_header(block, line, 'ActualHash: ', 'content_hash')
or self._read_header(block, line, 'DumpMalloc: ', 'malloc')
- or self._read_header(block, line, 'DumpJSHeap: ', 'js_heap')):
+ or self._read_header(block, line, 'DumpJSHeap: ', 'js_heap')
+ or self._read_header(block, line, 'StdinPath', 'stdin_path')):
return
# Note, we're not reading ExpectedHash: here, but we could.
# If the line wasn't a header, we just append it to the content.
@@ -507,6 +515,7 @@ class ContentBlock(object):
self.decoded_content = None
self.malloc = None
self.js_heap = None
+ self.stdin_path = None
def decode_content(self):
if self.encoding == 'base64' and self.content is not None:

Powered by Google App Engine
This is Rietveld 408576698