|
Lines 75-89
class Port(object):
a/WebKitTools/Scripts/webkitpy/layout_tests/port/base.py_sec1
|
| 75 |
Returns whether the system is properly configured.""" |
75 |
Returns whether the system is properly configured.""" |
| 76 |
raise NotImplementedError('Port.check_sys_deps') |
76 |
raise NotImplementedError('Port.check_sys_deps') |
| 77 |
|
77 |
|
| 78 |
def compare_text(self, actual_text, expected_text): |
78 |
def compare_text(self, expected_text, actual_text): |
| 79 |
"""Return whether or not the two strings are *not* equal. This |
79 |
"""Return whether or not the two strings are *not* equal. This |
| 80 |
routine is used to diff text output. |
80 |
routine is used to diff text output. |
| 81 |
|
81 |
|
| 82 |
While this is a generic routine, we include it in the Port |
82 |
While this is a generic routine, we include it in the Port |
| 83 |
interface so that it can be overriden for testing purposes.""" |
83 |
interface so that it can be overriden for testing purposes.""" |
| 84 |
return actual_text != expected_text |
84 |
return expected_text != actual_text |
| 85 |
|
85 |
|
| 86 |
def diff_image(self, actual_filename, expected_filename, |
86 |
def diff_image(self, expected_filename, actual_filename, |
| 87 |
diff_filename=None): |
87 |
diff_filename=None): |
| 88 |
"""Compare two image files and produce a delta image file. |
88 |
"""Compare two image files and produce a delta image file. |
| 89 |
|
89 |
|
|
Lines 94-100
class Port(object):
a/WebKitTools/Scripts/webkitpy/layout_tests/port/base.py_sec2
|
| 94 |
While this is a generic routine, we include it in the Port |
94 |
While this is a generic routine, we include it in the Port |
| 95 |
interface so that it can be overriden for testing purposes.""" |
95 |
interface so that it can be overriden for testing purposes.""" |
| 96 |
executable = self._path_to_image_diff() |
96 |
executable = self._path_to_image_diff() |
| 97 |
cmd = [executable, '--diff', actual_filename, expected_filename] |
97 |
cmd = [executable, '--diff', expected_filename, actual_filename] |
| 98 |
if diff_filename: |
98 |
if diff_filename: |
| 99 |
cmd.append(diff_filename) |
99 |
cmd.append(diff_filename) |
| 100 |
result = 1 |
100 |
result = 1 |
|
Lines 111-118
class Port(object):
a/WebKitTools/Scripts/webkitpy/layout_tests/port/base.py_sec3
|
| 111 |
pass |
111 |
pass |
| 112 |
return result |
112 |
return result |
| 113 |
|
113 |
|
| 114 |
def diff_text(self, actual_text, expected_text, |
114 |
def diff_text(self, expected_text, actual_text, |
| 115 |
actual_filename, expected_filename): |
115 |
expected_filename, actual_filename): |
| 116 |
"""Returns a string containing the diff of the two text strings |
116 |
"""Returns a string containing the diff of the two text strings |
| 117 |
in 'unified diff' format. |
117 |
in 'unified diff' format. |
| 118 |
|
118 |
|
|
Lines 476-483
class Port(object):
a/WebKitTools/Scripts/webkitpy/layout_tests/port/base.py_sec4
|
| 476 |
'--end-delete=##WDIFF_END##', |
476 |
'--end-delete=##WDIFF_END##', |
| 477 |
'--start-insert=##WDIFF_ADD##', |
477 |
'--start-insert=##WDIFF_ADD##', |
| 478 |
'--end-insert=##WDIFF_END##', |
478 |
'--end-insert=##WDIFF_END##', |
| 479 |
expected_filename, |
479 |
actual_filename, |
| 480 |
actual_filename] |
480 |
expected_filename] |
| 481 |
global _wdiff_available |
481 |
global _wdiff_available |
| 482 |
result = '' |
482 |
result = '' |
| 483 |
try: |
483 |
try: |