Changeset 74362 in webkit
- Timestamp:
- Dec 20, 2010 1:45:54 PM (13 years ago)
- Location:
- trunk/Tools
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r74356 r74362 1 2010-12-20 Cosmin Truta <ctruta@chromium.org> 2 3 Reviewed by James Robinson. 4 5 new-run-webkit-tests ignores trailing EOL differences in text tests 6 https://bugs.webkit.org/show_bug.cgi?id=36983 7 8 Changed the handling of new-line characters within new-run-webkit-tests 9 to match old-run-webkit-tests. Differences in leading and trailing empty 10 lines in text expectation files are no longer ignored. 11 12 * Scripts/webkitpy/layout_tests/port/base.py: 13 * Scripts/webkitpy/layout_tests/port/test.py: 14 Added unit tests. Removed old duplicate unit test entries. 15 * Scripts/webkitpy/layout_tests/test_types/text_diff.py: 16 1 17 2010-12-20 David Levin <levin@chromium.org> 2 18 -
trunk/Tools/Scripts/webkitpy/layout_tests/port/base.py
r74163 r74362 323 323 324 324 def expected_text(self, test): 325 """Returns the text output we expect the test to produce.""" 325 """Returns the text output we expect the test to produce. 326 End-of-line characters are normalized to '\n'.""" 326 327 # FIXME: DRT output is actually utf-8, but since we don't decode the 327 328 # output from DRT (instead treating it as a binary string), we read the … … 331 332 return '' 332 333 text = self._filesystem.read_binary_file(path) 333 return text. strip("\r\n").replace("\r\n", "\n") + "\n"334 return text.replace("\r\n", "\n") 334 335 335 336 def filename_to_uri(self, filename): -
trunk/Tools/Scripts/webkitpy/layout_tests/port/test.py
r74301 r74362 91 91 base.Port.__init__(self, **kwargs) 92 92 tests = TestList(self) 93 tests.add('passes/image.html')94 tests.add('passes/text.html')95 93 tests.add('failures/expected/checksum.html', 96 94 actual_checksum='checksum_fail-checksum') … … 115 113 tests.add('failures/expected/missing_text.html', 116 114 expected_text=None) 115 tests.add('failures/expected/newlines_leading.html', 116 expected_text="\nfoo\n", 117 actual_text="foo\n") 118 tests.add('failures/expected/newlines_trailing.html', 119 expected_text="foo\n\n", 120 actual_text="foo\n") 121 tests.add('failures/expected/newlines_with_excess_CR.html', 122 expected_text="foo\r\r\r\n", 123 actual_text="foo\n") 117 124 tests.add('failures/expected/text.html', 118 125 actual_text='text_fail-png') … … 127 134 tests.add('passes/image.html') 128 135 tests.add('passes/platform_image.html') 129 tests.add('passes/text.html') 136 # Text output files contain "\r\n" on Windows. This may be 137 # helpfully filtered to "\r\r\n" by our Python/Cygwin tooling. 138 tests.add('passes/text.html', 139 expected_text='\nfoo\n\n', 140 actual_text='\nfoo\r\n\r\r\n') 130 141 tests.add('websocket/tests/passes/text.html') 131 142 self._tests = tests … … 273 284 WONTFIX : failures/expected/missing_image.html = MISSING PASS 274 285 WONTFIX : failures/expected/missing_text.html = MISSING PASS 286 WONTFIX : failures/expected/newlines_leading.html = TEXT 287 WONTFIX : failures/expected/newlines_trailing.html = TEXT 288 WONTFIX : failures/expected/newlines_with_excess_CR.html = TEXT 275 289 WONTFIX : failures/expected/text.html = TEXT 276 290 WONTFIX : failures/expected/timeout.html = TIMEOUT -
trunk/Tools/Scripts/webkitpy/layout_tests/test_types/text_diff.py
r74163 r74362 50 50 51 51 def _get_normalized_output_text(self, output): 52 # Some tests produce "\r\n" explicitly. Our system (Python/Cygwin) 53 # helpfully changes the "\n" to "\r\n", resulting in "\r\r\n". 54 norm = output.replace("\r\r\n", "\r\n").strip("\r\n").replace( 55 "\r\n", "\n") 56 return norm + "\n" 52 """Returns the normalized text output, i.e. the output in which 53 the end-of-line characters are normalized to "\n".""" 54 # Running tests on Windows produces "\r\n". The "\n" part is helpfully 55 # changed to "\r\n" by our system (Python/Cygwin), resulting in 56 # "\r\r\n", when, in fact, we wanted to compare the text output with 57 # the normalized text expectation files. 58 return output.replace("\r\r\n", "\r\n").replace("\r\n", "\n") 57 59 58 60 def compare_output(self, port, filename, test_args, actual_test_output,
Note: See TracChangeset
for help on using the changeset viewer.