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

Unified Diff: Tools/Scripts/webkitpy/layout_tests/controllers/test_result_writer.py

Issue 303223008: Overlay expected and actual repaint rects for LayoutTests. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add several small features Created 6 years, 7 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/controllers/test_result_writer.py
diff --git a/Tools/Scripts/webkitpy/layout_tests/controllers/test_result_writer.py b/Tools/Scripts/webkitpy/layout_tests/controllers/test_result_writer.py
index f7f2b12e276f52af326cef805905e2cfc7e88c8f..024ef496ff6476761d346ddc896fff63bbd869b8 100644
--- a/Tools/Scripts/webkitpy/layout_tests/controllers/test_result_writer.py
+++ b/Tools/Scripts/webkitpy/layout_tests/controllers/test_result_writer.py
@@ -29,6 +29,7 @@
import logging
+from webkitpy.layout_tests.controllers import repaint_overlay
from webkitpy.layout_tests.models import test_failures
@@ -52,6 +53,7 @@ def write_test_result(filesystem, port, results_directory, test_name, driver_out
test_failures.FailureTestHarnessAssertion)):
writer.write_text_files(driver_output.text, expected_driver_output.text)
writer.create_text_diff_and_write_result(driver_output.text, expected_driver_output.text)
+ writer.create_repaint_overlay_result(driver_output.text, expected_driver_output.text)
elif isinstance(failure, test_failures.FailureMissingImage):
writer.write_image_files(driver_output.image, expected_image=None)
elif isinstance(failure, test_failures.FailureMissingImageHash):
@@ -107,6 +109,7 @@ class TestResultWriter(object):
FILENAME_SUFFIX_PRETTY_PATCH = "-pretty-diff.html"
FILENAME_SUFFIX_IMAGE_DIFF = "-diff.png"
FILENAME_SUFFIX_IMAGE_DIFFS_HTML = "-diffs.html"
+ FILENAME_SUFFIX_OVERLAY = "-overlay.html"
def __init__(self, filesystem, port, root_output_dir, test_name):
self._filesystem = filesystem
@@ -210,6 +213,12 @@ class TestResultWriter(object):
pretty_patch_filename = self.output_filename(self.FILENAME_SUFFIX_PRETTY_PATCH)
self._write_file(pretty_patch_filename, pretty_patch)
+ def create_repaint_overlay_result(self, actual_text, expected_text):
+ html = repaint_overlay.generate_repaint_overlay_html(self._test_name, actual_text, expected_text)
+ if html:
+ overlay_filename = self.output_filename(self.FILENAME_SUFFIX_OVERLAY)
+ self._write_file(overlay_filename, html)
+
def write_audio_files(self, actual_audio, expected_audio):
self.write_output_files('.wav', actual_audio, expected_audio)

Powered by Google App Engine
This is Rietveld 408576698