| 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 | 102 |
| 103 def __contains__(self, item): | 103 def __contains__(self, item): |
| 104 return item in self.tests | 104 return item in self.tests |
| 105 | 105 |
| 106 def __getitem__(self, item): | 106 def __getitem__(self, item): |
| 107 return self.tests[item] | 107 return self.tests[item] |
| 108 | 108 |
| 109 # | 109 # |
| 110 # These numbers may need to be updated whenever we add or delete tests. This inc
ludes virtual tests. | 110 # These numbers may need to be updated whenever we add or delete tests. This inc
ludes virtual tests. |
| 111 # | 111 # |
| 112 TOTAL_TESTS = 106 | 112 TOTAL_TESTS = 108 |
| 113 TOTAL_WONTFIX = 3 | 113 TOTAL_WONTFIX = 3 |
| 114 TOTAL_SKIPS = 22 + TOTAL_WONTFIX | 114 TOTAL_SKIPS = 22 + TOTAL_WONTFIX |
| 115 TOTAL_CRASHES = 76 | 115 TOTAL_CRASHES = 76 |
| 116 | 116 |
| 117 UNEXPECTED_PASSES = 1 | 117 UNEXPECTED_PASSES = 1 |
| 118 UNEXPECTED_FAILURES = 26 | 118 UNEXPECTED_FAILURES = 26 |
| 119 | 119 |
| 120 | 120 |
| 121 def unit_test_list(): | 121 def unit_test_list(): |
| 122 tests = TestList() | 122 tests = TestList() |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 expected_image='image_in_pixeldir-pngtEXtchecksum\x00checksum-png'
) | 258 expected_image='image_in_pixeldir-pngtEXtchecksum\x00checksum-png'
) |
| 259 tests.add('failures/unexpected/image_not_in_pixeldir.html', | 259 tests.add('failures/unexpected/image_not_in_pixeldir.html', |
| 260 actual_image='image_not_in_pixeldir-pngtEXtchecksum\x00checksum_fa
il', | 260 actual_image='image_not_in_pixeldir-pngtEXtchecksum\x00checksum_fa
il', |
| 261 expected_image='image_not_in_pixeldir-pngtEXtchecksum\x00checksum-
png') | 261 expected_image='image_not_in_pixeldir-pngtEXtchecksum\x00checksum-
png') |
| 262 | 262 |
| 263 # For testing that virtual test suites don't expand names containing themsel
ves | 263 # For testing that virtual test suites don't expand names containing themsel
ves |
| 264 # See webkit.org/b/97925 and base_unittest.PortTest.test_tests(). | 264 # See webkit.org/b/97925 and base_unittest.PortTest.test_tests(). |
| 265 tests.add('passes/test-virtual-passes.html') | 265 tests.add('passes/test-virtual-passes.html') |
| 266 tests.add('passes/virtual_passes/test-virtual-passes.html') | 266 tests.add('passes/virtual_passes/test-virtual-passes.html') |
| 267 | 267 |
| 268 tests.add('passes_two/test-virtual-passes.html') |
| 268 return tests | 269 return tests |
| 269 | 270 |
| 270 | 271 |
| 271 # Here we synthesize an in-memory filesystem from the test list | 272 # Here we synthesize an in-memory filesystem from the test list |
| 272 # in order to fully control the test output and to demonstrate that | 273 # in order to fully control the test output and to demonstrate that |
| 273 # we don't need a real filesystem to run the tests. | 274 # we don't need a real filesystem to run the tests. |
| 274 def add_unit_tests_to_mock_filesystem(filesystem): | 275 def add_unit_tests_to_mock_filesystem(filesystem): |
| 275 # Add the test_expectations file. | 276 # Add the test_expectations file. |
| 276 filesystem.maybe_make_directory(LAYOUT_TEST_DIR) | 277 filesystem.maybe_make_directory(LAYOUT_TEST_DIR) |
| 277 if not filesystem.exists(LAYOUT_TEST_DIR + '/TestExpectations'): | 278 if not filesystem.exists(LAYOUT_TEST_DIR + '/TestExpectations'): |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 525 architecture=architecture, | 526 architecture=architecture, |
| 526 build_type=build_type)) | 527 build_type=build_type)) |
| 527 return test_configurations | 528 return test_configurations |
| 528 | 529 |
| 529 def configuration_specifier_macros(self): | 530 def configuration_specifier_macros(self): |
| 530 return self.configuration_specifier_macros_dict | 531 return self.configuration_specifier_macros_dict |
| 531 | 532 |
| 532 def virtual_test_suites(self): | 533 def virtual_test_suites(self): |
| 533 return [ | 534 return [ |
| 534 VirtualTestSuite(prefix='virtual_passes', base='passes', args=['--vi
rtual-arg']), | 535 VirtualTestSuite(prefix='virtual_passes', base='passes', args=['--vi
rtual-arg']), |
| 536 VirtualTestSuite(prefix='virtual_passes', base='passes_two', args=['
--virtual-arg']), |
| 535 VirtualTestSuite(prefix='skipped', base='failures/expected', args=['
--virtual-arg2']), | 537 VirtualTestSuite(prefix='skipped', base='failures/expected', args=['
--virtual-arg2']), |
| 536 VirtualTestSuite(prefix='references_use_default_args', base='passes/
reftest.html', | 538 VirtualTestSuite(prefix='references_use_default_args', base='passes/
reftest.html', |
| 537 args=['--virtual-arg'], references_use_default_args
=True), | 539 args=['--virtual-arg'], references_use_default_args
=True), |
| 538 ] | 540 ] |
| 539 | 541 |
| 540 | 542 |
| 541 class TestDriver(Driver): | 543 class TestDriver(Driver): |
| 542 """Test/Dummy implementation of the driver interface.""" | 544 """Test/Dummy implementation of the driver interface.""" |
| 543 next_pid = 1 | 545 next_pid = 1 |
| 544 | 546 |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 629 else: | 631 else: |
| 630 image = test.actual_image | 632 image = test.actual_image |
| 631 return DriverOutput(actual_text, image, test.actual_checksum, audio, | 633 return DriverOutput(actual_text, image, test.actual_checksum, audio, |
| 632 crash=(crash or web_process_crash), crashed_process_
name=crashed_process_name, | 634 crash=(crash or web_process_crash), crashed_process_
name=crashed_process_name, |
| 633 crashed_pid=crashed_pid, crash_log=crash_log, | 635 crashed_pid=crashed_pid, crash_log=crash_log, |
| 634 test_time=time.time() - start_time, timeout=test.tim
eout, error=test.error, pid=self.pid, | 636 test_time=time.time() - start_time, timeout=test.tim
eout, error=test.error, pid=self.pid, |
| 635 leak=test.leak) | 637 leak=test.leak) |
| 636 | 638 |
| 637 def stop(self): | 639 def stop(self): |
| 638 self.started = False | 640 self.started = False |
| OLD | NEW |