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

Side by Side Diff: Tools/Scripts/webkitpy/layout_tests/port/test.py

Issue 308223002: Accept spaces before/after testharness.js output and CONSOLE output. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@navigator_crash_test
Patch Set: Created 6 years, 6 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 unified diff | Download patch
« no previous file with comments | « Tools/Scripts/webkitpy/layout_tests/controllers/single_test_runner.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (C) 2010 Google Inc. All rights reserved. 1 # Copyright (C) 2010 Google Inc. All rights reserved.
2 # 2 #
3 # Redistribution and use in source and binary forms, with or without 3 # Redistribution and use in source and binary forms, with or without
4 # modification, are permitted provided that the following conditions are 4 # modification, are permitted provided that the following conditions are
5 # met: 5 # met:
6 # 6 #
7 # * Redistributions of source code must retain the above copyright 7 # * Redistributions of source code must retain the above copyright
8 # notice, this list of conditions and the following disclaimer. 8 # notice, this list of conditions and the following disclaimer.
9 # * Redistributions in binary form must reproduce the above 9 # * Redistributions in binary form must reproduce the above
10 # copyright notice, this list of conditions and the following disclaimer 10 # copyright notice, this list of conditions and the following disclaimer
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 expected_text="\nfoo\n", actual_text="foo\n") 143 expected_text="\nfoo\n", actual_text="foo\n")
144 tests.add('failures/expected/newlines_trailing.html', 144 tests.add('failures/expected/newlines_trailing.html',
145 expected_text="foo\n\n", actual_text="foo\n") 145 expected_text="foo\n\n", actual_text="foo\n")
146 tests.add('failures/expected/newlines_with_excess_CR.html', 146 tests.add('failures/expected/newlines_with_excess_CR.html',
147 expected_text="foo\r\r\r\n", actual_text="foo\n") 147 expected_text="foo\r\r\r\n", actual_text="foo\n")
148 tests.add('failures/expected/testharness.html', 148 tests.add('failures/expected/testharness.html',
149 actual_text='This is a testharness.js-based test.\nFAIL: assert fire d\n.Harness: the test ran to completion.\n\n', expected_text=None, 149 actual_text='This is a testharness.js-based test.\nFAIL: assert fire d\n.Harness: the test ran to completion.\n\n', expected_text=None,
150 actual_image=None, expected_image=None, 150 actual_image=None, expected_image=None,
151 actual_checksum=None) 151 actual_checksum=None)
152 tests.add('failures/expected/testharness.html', 152 tests.add('failures/expected/testharness.html',
153 actual_text='CONSOLE LOG: error.\nThis is a testharness.js-based tes t.\nPASS: things are fine.\n.Harness: the test ran to completion.\n\n', expected _text=None, 153 actual_text='RANDOM TEXT.\nThis is a testharness.js-based test.\nPAS S: things are fine.\n.Harness: the test ran to completion.\n\n', expected_text=N one,
154 actual_image=None, expected_image=None, 154 actual_image=None, expected_image=None,
155 actual_checksum=None) 155 actual_checksum=None)
156 tests.add('failures/expected/text.html', actual_text='text_fail-png') 156 tests.add('failures/expected/text.html', actual_text='text_fail-png')
157 tests.add('failures/expected/crash_then_text.html') 157 tests.add('failures/expected/crash_then_text.html')
158 tests.add('failures/expected/skip_text.html', actual_text='text diff') 158 tests.add('failures/expected/skip_text.html', actual_text='text diff')
159 tests.add('failures/flaky/text.html') 159 tests.add('failures/flaky/text.html')
160 tests.add('failures/unexpected/missing_text.html', expected_text=None) 160 tests.add('failures/unexpected/missing_text.html', expected_text=None)
161 tests.add('failures/unexpected/missing_check.html', expected_image='missing- check-png') 161 tests.add('failures/unexpected/missing_check.html', expected_image='missing- check-png')
162 tests.add('failures/unexpected/missing_image.html', expected_image=None) 162 tests.add('failures/unexpected/missing_image.html', expected_image=None)
163 tests.add('failures/unexpected/missing_render_tree_dump.html', actual_text=" ""layer at (0,0) size 800x600 163 tests.add('failures/unexpected/missing_render_tree_dump.html', actual_text=" ""layer at (0,0) size 800x600
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 tests.add('passes/audio.html', 197 tests.add('passes/audio.html',
198 actual_audio=base64.b64encode('audio-wav'), expected_audio='audio- wav', 198 actual_audio=base64.b64encode('audio-wav'), expected_audio='audio- wav',
199 actual_text=None, expected_text=None, 199 actual_text=None, expected_text=None,
200 actual_image=None, expected_image=None, 200 actual_image=None, expected_image=None,
201 actual_checksum=None) 201 actual_checksum=None)
202 tests.add('passes/platform_image.html') 202 tests.add('passes/platform_image.html')
203 tests.add('passes/checksum_in_image.html', 203 tests.add('passes/checksum_in_image.html',
204 expected_image='tEXtchecksum\x00checksum_in_image-checksum') 204 expected_image='tEXtchecksum\x00checksum_in_image-checksum')
205 tests.add('passes/skipped/skip.html') 205 tests.add('passes/skipped/skip.html')
206 tests.add('passes/testharness.html', 206 tests.add('passes/testharness.html',
207 actual_text='CONSOLE LOG: error.\nThis is a testharness.js-based tes t.\nPASS: things are fine.\n.Harness: the test ran to completion.\n\n', expected _text=None,
208 actual_image=None, expected_image=None,
209 actual_checksum=None)
210 tests.add('passes/testharness.html',
211 actual_text='CONSOLE ERROR: error.\nThis is a testharness.js-based t est.\nPASS: things are fine.\n.Harness: the test ran to completion.\n\n', expect ed_text=None,
212 actual_image=None, expected_image=None,
213 actual_checksum=None)
214 tests.add('passes/testharness.html',
215 actual_text=' This is a testharness.js-based test.\nPASS: assert is fine\nHarness: the test ran to completion.\n\n', expected_text=None,
216 actual_image=None, expected_image=None,
217 actual_checksum=None)
218 tests.add('passes/testharness.html',
207 actual_text='This is a testharness.js-based test.\nPASS: assert is f ine\nHarness: the test ran to completion.\n\n', expected_text=None, 219 actual_text='This is a testharness.js-based test.\nPASS: assert is f ine\nHarness: the test ran to completion.\n\n', expected_text=None,
208 actual_image=None, expected_image=None, 220 actual_image=None, expected_image=None,
209 actual_checksum=None) 221 actual_checksum=None)
210 222
211 # Note that here the checksums don't match but the images do, so this test p asses "unexpectedly". 223 # Note that here the checksums don't match but the images do, so this test p asses "unexpectedly".
212 # See https://bugs.webkit.org/show_bug.cgi?id=69444 . 224 # See https://bugs.webkit.org/show_bug.cgi?id=69444 .
213 tests.add('failures/unexpected/checksum.html', actual_checksum='checksum_fai l-checksum') 225 tests.add('failures/unexpected/checksum.html', actual_checksum='checksum_fai l-checksum')
214 226
215 # Text output files contain "\r\n" on Windows. This may be 227 # Text output files contain "\r\n" on Windows. This may be
216 # helpfully filtered to "\r\r\n" by our Python/Cygwin tooling. 228 # helpfully filtered to "\r\r\n" by our Python/Cygwin tooling.
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after
659 else: 671 else:
660 image = test.actual_image 672 image = test.actual_image
661 return DriverOutput(actual_text, image, test.actual_checksum, audio, 673 return DriverOutput(actual_text, image, test.actual_checksum, audio,
662 crash=(crash or web_process_crash), crashed_process_name=crashed_pro cess_name, 674 crash=(crash or web_process_crash), crashed_process_name=crashed_pro cess_name,
663 crashed_pid=crashed_pid, crash_log=crash_log, 675 crashed_pid=crashed_pid, crash_log=crash_log,
664 test_time=time.time() - start_time, timeout=test.timeout, error=test .error, pid=self.pid, 676 test_time=time.time() - start_time, timeout=test.timeout, error=test .error, pid=self.pid,
665 leak=test.leak) 677 leak=test.leak)
666 678
667 def stop(self): 679 def stop(self):
668 self.started = False 680 self.started = False
OLDNEW
« no previous file with comments | « Tools/Scripts/webkitpy/layout_tests/controllers/single_test_runner.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698