Changeset 55372 in webkit
- Timestamp:
- Mar 1, 2010 11:36:23 AM (14 years ago)
- Location:
- trunk/WebKitTools
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKitTools/ChangeLog
r55363 r55372 1 2010-03-01 Dirk Pranke <dpranke@chromium.org> 2 3 Reviewed by David Levin. 4 5 new-chromium-webkit-tests --platform=mac-leopard diffs are backwards 6 https://bugs.webkit.org/show_bug.cgi?id=35265 7 8 Some parts of the code passed arguments as 9 "actual, expected" and some passed as "expected, actual". 10 As you might imagine, this lead to great confusion and wrongness. 11 Standardize on "expected, actual" as that's the order which is 12 passed to the underlying diff tool. 13 14 Based on a patch by Eric Siedel <eric@webkit.org>. 15 16 * Scripts/webkitpy/layout_tests/port/base.py: 17 * Scripts/webkitpy/layout_tests/port/chromium.py: 18 * Scripts/webkitpy/layout_tests/port/test.py: 19 * Scripts/webkitpy/layout_tests/test_types/image_diff.py 20 1 21 2010-03-01 Chris Jerdonek <cjerdonek@webkit.org> 2 22 -
trunk/WebKitTools/Scripts/webkitpy/layout_tests/port/base.py
r55123 r55372 76 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 79 """Return whether or not the two strings are *not* equal. This 80 80 routine is used to diff text output. … … 82 82 While this is a generic routine, we include it in the Port 83 83 interface so that it can be overriden for testing purposes.""" 84 return actual_text != expected_text85 86 def diff_image(self, actual_filename, expected_filename,84 return expected_text != actual_text 85 86 def diff_image(self, expected_filename, actual_filename, 87 87 diff_filename=None): 88 88 """Compare two image files and produce a delta image file. … … 95 95 interface so that it can be overriden for testing purposes.""" 96 96 executable = self._path_to_image_diff() 97 cmd = [executable, '--diff', actual_filename, expected_filename]97 cmd = [executable, '--diff', expected_filename, actual_filename] 98 98 if diff_filename: 99 99 cmd.append(diff_filename) … … 112 112 return result 113 113 114 def diff_text(self, actual_text, expected_text,115 actual_filename, expected_filename):114 def diff_text(self, expected_text, actual_text, 115 expected_filename, actual_filename): 116 116 """Returns a string containing the diff of the two text strings 117 117 in 'unified diff' format. … … 477 477 '--start-insert=##WDIFF_ADD##', 478 478 '--end-insert=##WDIFF_END##', 479 expected_filename,480 actual_filename]479 actual_filename, 480 expected_filename] 481 481 global _wdiff_available 482 482 result = '' -
trunk/WebKitTools/Scripts/webkitpy/layout_tests/port/chromium.py
r55123 r55372 91 91 return result 92 92 93 def compare_text(self, actual_text, expected_text):94 return actual_text != expected_text95 96 93 def path_from_chromium_base(self, *comps): 97 94 """Returns the full path to path made by joining the top of the -
trunk/WebKitTools/Scripts/webkitpy/layout_tests/port/test.py
r55268 r55372 56 56 return True 57 57 58 def diff_image(self, actual_filename, expected_filename,58 def diff_image(self, expected_filename, actual_filename, 59 59 diff_filename=None): 60 60 return False 61 61 62 def compare_text(self, actual_text, expected_text):62 def compare_text(self, expected_text, actual_text): 63 63 return False 64 64 65 def diff_text(self, actual_text, expected_text,66 actual_filename, expected_filename):65 def diff_text(self, expected_text, actual_text, 66 expected_filename, actual_filename): 67 67 return '' 68 68 … … 121 121 return '' 122 122 123 def wdiff_text(self, actual_filename, expected_filename):123 def wdiff_text(self, expected_filename, actual_filename): 124 124 return '' 125 125 -
trunk/WebKitTools/Scripts/webkitpy/layout_tests/test_types/image_diff.py
r54449 r55372 99 99 try: 100 100 _compare_available = True 101 result = port.diff_image( actual_filename, expected_filename,101 result = port.diff_image(expected_filename, actual_filename, 102 102 diff_filename) 103 103 except ValueError:
Note: See TracChangeset
for help on using the changeset viewer.