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 968 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
979 suffixes = set() | 979 suffixes = set() |
980 if IMAGE in expectations: | 980 if IMAGE in expectations: |
981 suffixes.add('png') | 981 suffixes.add('png') |
982 if FAIL in expectations: | 982 if FAIL in expectations: |
983 suffixes.add('txt') | 983 suffixes.add('txt') |
984 suffixes.add('png') | 984 suffixes.add('png') |
985 suffixes.add('wav') | 985 suffixes.add('wav') |
986 return set(suffixes) | 986 return set(suffixes) |
987 | 987 |
988 @staticmethod | 988 @staticmethod |
989 # test_result is an instance of webkitpy.common.net.layouttestresults.Layout
TestResult | 989 # test_result is an instance of webkitpy.common.net.layout_test_results.Layo
utTestResult |
990 def suffixes_for_test_result(test_result): | 990 def suffixes_for_test_result(test_result): |
991 suffixes = set() | 991 suffixes = set() |
992 actual_results = test_result.actual_results() | 992 actual_results = test_result.actual_results() |
993 if 'TEXT' in actual_results: | 993 if 'TEXT' in actual_results: |
994 suffixes.add('txt') | 994 suffixes.add('txt') |
995 if 'IMAGE' in actual_results: | 995 if 'IMAGE' in actual_results: |
996 suffixes.add('png') | 996 suffixes.add('png') |
997 if 'AUDIO' in actual_results: | 997 if 'AUDIO' in actual_results: |
998 suffixes.add('wav') | 998 suffixes.add('wav') |
999 if 'MISSING' in actual_results: | 999 if 'MISSING' in actual_results: |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1206 # If reconstitute_only_these is an empty list, we want to return ori
ginal_string. | 1206 # If reconstitute_only_these is an empty list, we want to return ori
ginal_string. |
1207 # So we need to compare reconstitute_only_these to None, not just ch
eck if it's falsey. | 1207 # So we need to compare reconstitute_only_these to None, not just ch
eck if it's falsey. |
1208 if reconstitute_only_these is None or expectation_line in reconstitu
te_only_these: | 1208 if reconstitute_only_these is None or expectation_line in reconstitu
te_only_these: |
1209 return expectation_line.to_string(test_configuration_converter) | 1209 return expectation_line.to_string(test_configuration_converter) |
1210 return expectation_line.original_string | 1210 return expectation_line.original_string |
1211 | 1211 |
1212 def nones_out(expectation_line): | 1212 def nones_out(expectation_line): |
1213 return expectation_line is not None | 1213 return expectation_line is not None |
1214 | 1214 |
1215 return '\n'.join(filter(nones_out, map(serialize, expectation_lines))) | 1215 return '\n'.join(filter(nones_out, map(serialize, expectation_lines))) |
OLD | NEW |