Changeset 73228 in webkit
- Timestamp:
- Dec 2, 2010 6:29:13 PM (13 years ago)
- Location:
- trunk/WebKitTools
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKitTools/ChangeLog
r73226 r73228 1 2010-12-02 Hayato Ito <hayato@chromium.org> 2 3 Reviewed by Eric Seidel. 4 5 Refactor test_types's compare_output() method so that it takes a 6 TestInput object. 7 8 compare_output() will need additional information included in a TestInput 9 object to support reftests. This change is a pre-requirement of that. 10 11 https://bugs.webkit.org/show_bug.cgi?id=50362 12 13 * Scripts/webkitpy/layout_tests/layout_package/dump_render_tree_thread.py: 14 * Scripts/webkitpy/layout_tests/test_types/image_diff.py: 15 * Scripts/webkitpy/layout_tests/test_types/test_type_base.py: 16 * Scripts/webkitpy/layout_tests/test_types/test_type_base_unittest.py: 17 * Scripts/webkitpy/layout_tests/test_types/text_diff.py: 18 1 19 2010-12-02 Simon Fraser <simon.fraser@apple.com> 2 20 -
trunk/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/dump_render_tree_thread.py
r73222 r73228 387 387 test_input.filename) 388 388 test_output = driver.run_test(test_input) 389 return self._process_output(test_input .filename, test_output)390 391 def _process_output(self, test_ filename, test_output):389 return self._process_output(test_input, test_output) 390 391 def _process_output(self, test_input, test_output): 392 392 """Receives the output from a DumpRenderTree process, subjects it to a 393 393 number of tests, and returns a list of failure types the test produced. 394 394 395 395 Args: 396 test_ filename: full path to the test in question.396 test_input: a TestInput object 397 397 test_output: a TestOutput object containing the output of the test 398 398 … … 400 400 """ 401 401 failures = [] 402 test_filename = test_input.filename 402 403 403 404 if test_output.crash: … … 427 428 start_diff_time = time.time() 428 429 new_failures = test_type.compare_output(self._port, 429 test_ filename,430 test_input, 430 431 self._test_args, 431 432 test_output, -
trunk/WebKitTools/Scripts/webkitpy/layout_tests/test_types/image_diff.py
r72314 r73228 91 91 return port.diff_image(actual_image, expected_image, diff_filename) 92 92 93 def compare_output(self, port, filename, test_args, actual_test_output,93 def compare_output(self, port, test_input, test_args, actual_test_output, 94 94 expected_test_output): 95 95 """Implementation of CompareOutput that checks the output image and … … 97 97 """ 98 98 failures = [] 99 filename = test_input.filename 99 100 100 101 # If we didn't produce a hash file, this test must be text-only. -
trunk/WebKitTools/Scripts/webkitpy/layout_tests/test_types/test_type_base.py
r72249 r73228 141 141 return os.path.splitext(output_filename)[0] + modifier 142 142 143 def compare_output(self, port, filename, test_args, actual_test_output,143 def compare_output(self, port, test_input, test_args, actual_test_output, 144 144 expected_test_output): 145 145 """Method that compares the output from the test with the … … 150 150 Args: 151 151 port: object implementing port-specific information and methods 152 filename: absolute filename to test file152 test_input: a TestInput object 153 153 test_args: a TestArguments object holding optional additional 154 154 arguments -
trunk/WebKitTools/Scripts/webkitpy/layout_tests/test_types/test_type_base_unittest.py
r65953 r73228 40 40 test_type = test_type_base.TestTypeBase(None, None) 41 41 self.assertRaises(NotImplementedError, test_type.compare_output, 42 None, "foo.txt", '', 43 test_type_base.TestArguments(), 'Debug') 42 None, None, test_type_base.TestArguments(), None, None) 44 43 45 44 -
trunk/WebKitTools/Scripts/webkitpy/layout_tests/test_types/text_diff.py
r72307 r73228 56 56 return norm + "\n" 57 57 58 def compare_output(self, port, filename, test_args, actual_test_output,58 def compare_output(self, port, test_input, test_args, actual_test_output, 59 59 expected_test_output): 60 60 """Implementation of CompareOutput that checks the output text against … … 67 67 # we do not ever decode it inside run-webkit-tests. For some tests 68 68 # DumpRenderTree may not output utf-8 text (e.g. webarchives). 69 self._save_baseline_data( filename, actual_test_output.text,69 self._save_baseline_data(test_input.filename, actual_test_output.text, 70 70 ".txt", encoding=None, 71 71 generate_new_baseline=test_args.new_baseline) … … 80 80 if port.compare_text(actual_text, expected_text): 81 81 # Text doesn't match, write output files. 82 self.write_output_files( filename, ".txt", actual_text,82 self.write_output_files(test_input.filename, ".txt", actual_text, 83 83 expected_text, encoding=None, 84 84 print_text_diffs=True)
Note: See TracChangeset
for help on using the changeset viewer.