Changeset 74136 in webkit
- Timestamp:
- Dec 15, 2010 12:39:29 PM (13 years ago)
- Location:
- trunk/WebKitTools
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKitTools/ChangeLog
r74135 r74136 1 2010-12-15 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-15 Ojan Vafai <ojan@chromium.org> 2 18 -
trunk/WebKitTools/Scripts/webkitpy/layout_tests/port/base.py
r73259 r74136 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/WebKitTools/Scripts/webkitpy/layout_tests/port/test.py
r74036 r74136 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') … … 125 132 tests.add('passes/image.html') 126 133 tests.add('passes/platform_image.html') 127 tests.add('passes/text.html') 134 # Text output files contain "\r\n" on Windows. This may be 135 # helpfully filtered to "\r\r\n" by our Python/Cygwin tooling. 136 tests.add('passes/text.html', 137 expected_text='\nfoo\n\n', 138 actual_text='\nfoo\r\n\r\r\n') 128 139 tests.add('websocket/tests/passes/text.html') 129 140 self._tests = tests … … 271 282 WONTFIX : failures/expected/missing_image.html = MISSING PASS 272 283 WONTFIX : failures/expected/missing_text.html = MISSING PASS 284 WONTFIX : failures/expected/newlines_leading.html = TEXT 285 WONTFIX : failures/expected/newlines_trailing.html = TEXT 286 WONTFIX : failures/expected/newlines_with_excess_CR.html = TEXT 273 287 WONTFIX : failures/expected/text.html = TEXT 274 288 WONTFIX : failures/expected/timeout.html = TIMEOUT -
trunk/WebKitTools/Scripts/webkitpy/layout_tests/test_types/text_diff.py
r73256 r74136 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.