summaryrefslogtreecommitdiff
path: root/chromium/third_party/blink/tools/blinkpy/web_tests/port/mock_drt.py
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2019-02-13 15:05:36 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2019-02-14 10:33:47 +0000
commite684a3455bcc29a6e3e66a004e352dea4e1141e7 (patch)
treed55b4003bde34d7d05f558f02cfd82b2a66a7aac /chromium/third_party/blink/tools/blinkpy/web_tests/port/mock_drt.py
parent2b94bfe47ccb6c08047959d1c26e392919550e86 (diff)
downloadqtwebengine-chromium-e684a3455bcc29a6e3e66a004e352dea4e1141e7.tar.gz
BASELINE: Update Chromium to 72.0.3626.110 and Ninja to 1.9.0
Change-Id: Ic57220b00ecc929a893c91f5cc552f5d3e99e922 Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Diffstat (limited to 'chromium/third_party/blink/tools/blinkpy/web_tests/port/mock_drt.py')
-rw-r--r--chromium/third_party/blink/tools/blinkpy/web_tests/port/mock_drt.py24
1 files changed, 10 insertions, 14 deletions
diff --git a/chromium/third_party/blink/tools/blinkpy/web_tests/port/mock_drt.py b/chromium/third_party/blink/tools/blinkpy/web_tests/port/mock_drt.py
index 77cb9ed8b02..997c8c5dafc 100644
--- a/chromium/third_party/blink/tools/blinkpy/web_tests/port/mock_drt.py
+++ b/chromium/third_party/blink/tools/blinkpy/web_tests/port/mock_drt.py
@@ -73,15 +73,15 @@ class MockDRTPort(object):
def check_build(self, needs_http, printer):
return exit_codes.OK_EXIT_STATUS
- def check_sys_deps(self, needs_http):
+ def check_sys_deps(self):
return exit_codes.OK_EXIT_STATUS
def _driver_class(self, delegate):
return self._mocked_driver_maker
- def _mocked_driver_maker(self, port, worker_number, pixel_tests, no_timeout=False):
+ def _mocked_driver_maker(self, port, worker_number, no_timeout=False):
path_to_this_file = self.host.filesystem.abspath(__file__.replace('.pyc', '.py'))
- driver = self.__delegate_driver_class()(self, worker_number, pixel_tests, no_timeout)
+ driver = self.__delegate_driver_class()(self, worker_number, no_timeout)
driver.cmd_line = self._overriding_cmd_line(driver.cmd_line,
self.__delegate._path_to_driver(),
sys.executable,
@@ -91,8 +91,8 @@ class MockDRTPort(object):
@staticmethod
def _overriding_cmd_line(original_cmd_line, driver_path, python_exe, this_file, port_name):
- def new_cmd_line(pixel_tests, per_test_args):
- cmd_line = original_cmd_line(pixel_tests, per_test_args)
+ def new_cmd_line(per_test_args):
+ cmd_line = original_cmd_line(per_test_args)
index = cmd_line.index(driver_path)
cmd_line[index:index + 1] = [python_exe, this_file, '--platform', port_name]
return cmd_line
@@ -194,12 +194,8 @@ class MockDRT(object):
vals = line.strip().split("'")
uri = vals[0]
checksum = None
- should_run_pixel_tests = False
- if len(vals) == 2 and vals[1] == '--pixel-test':
- should_run_pixel_tests = True
- elif len(vals) == 3 and vals[1] == '--pixel-test':
- should_run_pixel_tests = True
- checksum = vals[2]
+ if len(vals) == 2:
+ checksum = vals[1]
elif len(vals) != 1:
raise NotImplementedError
@@ -208,7 +204,7 @@ class MockDRT(object):
else:
test_name = self._port.relative_test_filename(uri)
- return DriverInput(test_name, 0, checksum, should_run_pixel_tests, args=[])
+ return DriverInput(test_name, 0, checksum, args=[])
def output_for_test(self, test_input, is_reftest):
port = self._port
@@ -228,7 +224,7 @@ class MockDRT(object):
actual_text = 'not reference text\n'
actual_checksum = 'not-mock-checksum'
actual_image = 'not blank'
- elif test_input.should_run_pixel_test and test_input.image_hash:
+ elif test_input.image_hash:
actual_checksum = port.expected_checksum(test_input.test_name)
actual_image = port.expected_image(test_input.test_name)
@@ -264,7 +260,7 @@ class MockDRT(object):
self._stdout.write('#EOF\n')
- if test_input.should_run_pixel_test and output.image_hash:
+ if output.image_hash:
self._stdout.write('\n')
self._stdout.write('ActualHash: %s\n' % output.image_hash)
self._stdout.write('ExpectedHash: %s\n' % test_input.image_hash)