OLD | NEW |
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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 | 95 |
96 def __contains__(self, item): | 96 def __contains__(self, item): |
97 return item in self.tests | 97 return item in self.tests |
98 | 98 |
99 def __getitem__(self, item): | 99 def __getitem__(self, item): |
100 return self.tests[item] | 100 return self.tests[item] |
101 | 101 |
102 # | 102 # |
103 # These numbers may need to be updated whenever we add or delete tests. This inc
ludes virtual tests. | 103 # These numbers may need to be updated whenever we add or delete tests. This inc
ludes virtual tests. |
104 # | 104 # |
105 TOTAL_TESTS = 110 | 105 TOTAL_TESTS = 114 |
106 TOTAL_SKIPS = 28 | 106 TOTAL_SKIPS = 29 |
107 | 107 |
108 UNEXPECTED_PASSES = 1 | 108 UNEXPECTED_PASSES = 1 |
109 UNEXPECTED_FAILURES = 25 | 109 UNEXPECTED_FAILURES = 25 |
110 | 110 |
111 def unit_test_list(): | 111 def unit_test_list(): |
112 tests = TestList() | 112 tests = TestList() |
113 tests.add('failures/expected/crash.html', crash=True) | 113 tests.add('failures/expected/crash.html', crash=True) |
114 tests.add('failures/expected/exception.html', exception=True) | 114 tests.add('failures/expected/exception.html', exception=True) |
115 tests.add('failures/expected/device_failure.html', device_failure=True) | 115 tests.add('failures/expected/device_failure.html', device_failure=True) |
116 tests.add('failures/expected/timeout.html', timeout=True) | 116 tests.add('failures/expected/timeout.html', timeout=True) |
(...skipping 19 matching lines...) Expand all Loading... |
136 actual_text=None, expected_text=None, | 136 actual_text=None, expected_text=None, |
137 actual_image=None, expected_image=None, | 137 actual_image=None, expected_image=None, |
138 actual_checksum=None) | 138 actual_checksum=None) |
139 tests.add('failures/expected/missing_text.html', expected_text=None) | 139 tests.add('failures/expected/missing_text.html', expected_text=None) |
140 tests.add('failures/expected/newlines_leading.html', | 140 tests.add('failures/expected/newlines_leading.html', |
141 expected_text="\nfoo\n", actual_text="foo\n") | 141 expected_text="\nfoo\n", actual_text="foo\n") |
142 tests.add('failures/expected/newlines_trailing.html', | 142 tests.add('failures/expected/newlines_trailing.html', |
143 expected_text="foo\n\n", actual_text="foo\n") | 143 expected_text="foo\n\n", actual_text="foo\n") |
144 tests.add('failures/expected/newlines_with_excess_CR.html', | 144 tests.add('failures/expected/newlines_with_excess_CR.html', |
145 expected_text="foo\r\r\r\n", actual_text="foo\n") | 145 expected_text="foo\r\r\r\n", actual_text="foo\n") |
| 146 tests.add('failures/expected/testharness.html', |
| 147 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, |
| 148 actual_image=None, expected_image=None, |
| 149 actual_checksum=None) |
146 tests.add('failures/expected/text.html', actual_text='text_fail-png') | 150 tests.add('failures/expected/text.html', actual_text='text_fail-png') |
147 tests.add('failures/expected/crash_then_text.html') | 151 tests.add('failures/expected/crash_then_text.html') |
148 tests.add('failures/expected/skip_text.html', actual_text='text diff') | 152 tests.add('failures/expected/skip_text.html', actual_text='text diff') |
149 tests.add('failures/flaky/text.html') | 153 tests.add('failures/flaky/text.html') |
150 tests.add('failures/unexpected/missing_text.html', expected_text=None) | 154 tests.add('failures/unexpected/missing_text.html', expected_text=None) |
151 tests.add('failures/unexpected/missing_check.html', expected_image='missing-
check-png') | 155 tests.add('failures/unexpected/missing_check.html', expected_image='missing-
check-png') |
152 tests.add('failures/unexpected/missing_image.html', expected_image=None) | 156 tests.add('failures/unexpected/missing_image.html', expected_image=None) |
153 tests.add('failures/unexpected/missing_render_tree_dump.html', actual_text="
""layer at (0,0) size 800x600 | 157 tests.add('failures/unexpected/missing_render_tree_dump.html', actual_text="
""layer at (0,0) size 800x600 |
154 RenderView at (0,0) size 800x600 | 158 RenderView at (0,0) size 800x600 |
155 layer at (0,0) size 800x34 | 159 layer at (0,0) size 800x34 |
(...skipping 29 matching lines...) Expand all Loading... |
185 tests.add('passes/image.html') | 189 tests.add('passes/image.html') |
186 tests.add('passes/audio.html', | 190 tests.add('passes/audio.html', |
187 actual_audio=base64.b64encode('audio-wav'), expected_audio='audio-
wav', | 191 actual_audio=base64.b64encode('audio-wav'), expected_audio='audio-
wav', |
188 actual_text=None, expected_text=None, | 192 actual_text=None, expected_text=None, |
189 actual_image=None, expected_image=None, | 193 actual_image=None, expected_image=None, |
190 actual_checksum=None) | 194 actual_checksum=None) |
191 tests.add('passes/platform_image.html') | 195 tests.add('passes/platform_image.html') |
192 tests.add('passes/checksum_in_image.html', | 196 tests.add('passes/checksum_in_image.html', |
193 expected_image='tEXtchecksum\x00checksum_in_image-checksum') | 197 expected_image='tEXtchecksum\x00checksum_in_image-checksum') |
194 tests.add('passes/skipped/skip.html') | 198 tests.add('passes/skipped/skip.html') |
| 199 tests.add('passes/testharness.html', |
| 200 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, |
| 201 actual_image=None, expected_image=None, |
| 202 actual_checksum=None) |
195 | 203 |
196 # Note that here the checksums don't match but the images do, so this test p
asses "unexpectedly". | 204 # Note that here the checksums don't match but the images do, so this test p
asses "unexpectedly". |
197 # See https://bugs.webkit.org/show_bug.cgi?id=69444 . | 205 # See https://bugs.webkit.org/show_bug.cgi?id=69444 . |
198 tests.add('failures/unexpected/checksum.html', actual_checksum='checksum_fai
l-checksum') | 206 tests.add('failures/unexpected/checksum.html', actual_checksum='checksum_fai
l-checksum') |
199 | 207 |
200 # Text output files contain "\r\n" on Windows. This may be | 208 # Text output files contain "\r\n" on Windows. This may be |
201 # helpfully filtered to "\r\r\n" by our Python/Cygwin tooling. | 209 # helpfully filtered to "\r\r\n" by our Python/Cygwin tooling. |
202 tests.add('passes/text.html', | 210 tests.add('passes/text.html', |
203 expected_text='\nfoo\n\n', actual_text='\nfoo\r\n\r\r\n') | 211 expected_text='\nfoo\n\n', actual_text='\nfoo\r\n\r\r\n') |
204 | 212 |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
290 Bug(test) failures/expected/mismatch.html [ ImageOnlyFailure ] | 298 Bug(test) failures/expected/mismatch.html [ ImageOnlyFailure ] |
291 Bug(test) failures/expected/missing_check.html [ Missing Pass ] | 299 Bug(test) failures/expected/missing_check.html [ Missing Pass ] |
292 Bug(test) failures/expected/missing_image.html [ Missing Pass ] | 300 Bug(test) failures/expected/missing_image.html [ Missing Pass ] |
293 Bug(test) failures/expected/missing_audio.html [ Missing Pass ] | 301 Bug(test) failures/expected/missing_audio.html [ Missing Pass ] |
294 Bug(test) failures/expected/missing_text.html [ Missing Pass ] | 302 Bug(test) failures/expected/missing_text.html [ Missing Pass ] |
295 Bug(test) failures/expected/newlines_leading.html [ Failure ] | 303 Bug(test) failures/expected/newlines_leading.html [ Failure ] |
296 Bug(test) failures/expected/newlines_trailing.html [ Failure ] | 304 Bug(test) failures/expected/newlines_trailing.html [ Failure ] |
297 Bug(test) failures/expected/newlines_with_excess_CR.html [ Failure ] | 305 Bug(test) failures/expected/newlines_with_excess_CR.html [ Failure ] |
298 Bug(test) failures/expected/reftest.html [ ImageOnlyFailure ] | 306 Bug(test) failures/expected/reftest.html [ ImageOnlyFailure ] |
299 Bug(test) failures/expected/text.html [ Failure ] | 307 Bug(test) failures/expected/text.html [ Failure ] |
| 308 Bug(test) failures/expected/testharness.html [ Failure ] |
300 Bug(test) failures/expected/timeout.html [ Timeout ] | 309 Bug(test) failures/expected/timeout.html [ Timeout ] |
301 Bug(test) failures/expected/keyboard.html [ WontFix ] | 310 Bug(test) failures/expected/keyboard.html [ WontFix ] |
302 Bug(test) failures/expected/exception.html [ WontFix ] | 311 Bug(test) failures/expected/exception.html [ WontFix ] |
303 Bug(test) failures/expected/device_failure.html [ WontFix ] | 312 Bug(test) failures/expected/device_failure.html [ WontFix ] |
304 Bug(test) failures/unexpected/pass.html [ Failure ] | 313 Bug(test) failures/unexpected/pass.html [ Failure ] |
305 Bug(test) passes/skipped/skip.html [ Skip ] | 314 Bug(test) passes/skipped/skip.html [ Skip ] |
306 Bug(test) passes/text.html [ Pass ] | 315 Bug(test) passes/text.html [ Pass ] |
307 """) | 316 """) |
308 | 317 |
309 filesystem.maybe_make_directory(LAYOUT_TEST_DIR + '/reftests/foo') | 318 filesystem.maybe_make_directory(LAYOUT_TEST_DIR + '/reftests/foo') |
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
641 image = None | 650 image = None |
642 else: | 651 else: |
643 image = test.actual_image | 652 image = test.actual_image |
644 return DriverOutput(actual_text, image, test.actual_checksum, audio, | 653 return DriverOutput(actual_text, image, test.actual_checksum, audio, |
645 crash=(crash or web_process_crash), crashed_process_name=crashed_pro
cess_name, | 654 crash=(crash or web_process_crash), crashed_process_name=crashed_pro
cess_name, |
646 crashed_pid=crashed_pid, crash_log=crash_log, | 655 crashed_pid=crashed_pid, crash_log=crash_log, |
647 test_time=time.time() - start_time, timeout=test.timeout, error=test
.error, pid=self.pid) | 656 test_time=time.time() - start_time, timeout=test.timeout, error=test
.error, pid=self.pid) |
648 | 657 |
649 def stop(self): | 658 def stop(self): |
650 self.started = False | 659 self.started = False |
OLD | NEW |