Commit 57f8a91b authored by qyearsley's avatar qyearsley Committed by Commit bot

In LayoutTestResult, change is_missing_* methods to accept explicit False.

This doesn't change any behavior in practice, since whenever is_missing_*
is present in a layout test dict, it's always true, as far as I know.

This change also changes did_run_as_expected.

So, this is just a minor tweak for correctness in case those fields are
ever explicitly given as False.

Review-Url: https://codereview.chromium.org/2326063003
Cr-Commit-Position: refs/heads/master@{#417967}
parent 712c7a94
......@@ -51,23 +51,16 @@ class LayoutTestResult(object):
return 'PASS' in self.actual_results()
def did_run_as_expected(self):
# TODO(qyearsley): For correctness, this should be:
# return not self._result_dict.get('is_unexpected', False)
# (Right now for expected results it's not added to the result dict
# but in theory it could be present.)
return 'is_unexpected' not in self._result_dict
return not self._result_dict.get('is_unexpected', False)
def is_missing_image(self):
# TODO(qyearsley): Change this to:
# self._result_dict.get('is_missing_image', False)
# The following method should likewise be changed.
return 'is_missing_image' in self._result_dict
return self._result_dict.get('is_missing_image', False)
def is_missing_text(self):
return 'is_missing_text' in self._result_dict
return self._result_dict.get('is_missing_text', False)
def is_missing_audio(self):
return 'is_missing_audio' in self._result_dict
return self._result_dict.get('is_missing_audio', False)
def actual_results(self):
return self._result_dict['actual']
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment