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

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/common/net/layouttestresults.py

Issue 2277303003: In update-w3c-test-expectations, handle failure to fetch results. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 3 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
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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 def test_name(self): 44 def test_name(self):
45 return self._test_name 45 return self._test_name
46 46
47 def did_pass_or_run_as_expected(self): 47 def did_pass_or_run_as_expected(self):
48 return self.did_pass() or self.did_run_as_expected() 48 return self.did_pass() or self.did_run_as_expected()
49 49
50 def did_pass(self): 50 def did_pass(self):
51 return 'PASS' in self.actual_results() 51 return 'PASS' in self.actual_results()
52 52
53 def did_run_as_expected(self): 53 def did_run_as_expected(self):
54 # TODO(qyearsley): For correctness, this should be:
55 # return not self._result_dict.get('is_unexpected', False)
56 # (Right now for expected results it's not added to the result dict
57 # but in theory it could be present.)
54 return 'is_unexpected' not in self._result_dict 58 return 'is_unexpected' not in self._result_dict
55 59
56 def is_missing_image(self): 60 def is_missing_image(self):
61 # TODO(qyearsley): Change this to:
62 # self._result_dict.get('is_missing_image', False)
63 # The following method should likewise be changed.
57 return 'is_missing_image' in self._result_dict 64 return 'is_missing_image' in self._result_dict
58 65
59 def is_missing_text(self): 66 def is_missing_text(self):
60 return 'is_missing_text' in self._result_dict 67 return 'is_missing_text' in self._result_dict
61 68
62 def is_missing_audio(self): 69 def is_missing_audio(self):
63 return 'is_missing_audio' in self._result_dict 70 return 'is_missing_audio' in self._result_dict
64 71
65 def actual_results(self): 72 def actual_results(self):
66 return self._result_dict['actual'] 73 return self._result_dict['actual']
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 results.append(result) 159 results.append(result)
153 160
154 LayoutTestResults._for_each_test(self._test_result_tree(), add_if_passes ) 161 LayoutTestResults._for_each_test(self._test_result_tree(), add_if_passes )
155 return sorted(results, key=lambda r: r.test_name()) 162 return sorted(results, key=lambda r: r.test_name())
156 163
157 def unexpected_mismatch_results(self): 164 def unexpected_mismatch_results(self):
158 return self._filter_tests(lambda r: r.has_mismatch_result() and not r.di d_run_as_expected()) 165 return self._filter_tests(lambda r: r.has_mismatch_result() and not r.di d_run_as_expected())
159 166
160 def didnt_run_as_expected_results(self): 167 def didnt_run_as_expected_results(self):
161 return self._filter_tests(lambda r: not r.did_run_as_expected()) 168 return self._filter_tests(lambda r: not r.did_run_as_expected())
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698