| Index: third_party/WebKit/Tools/Scripts/webkitpy/w3c/wpt_expectations_updater.py
|
| diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/wpt_expectations_updater.py b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/wpt_expectations_updater.py
|
| index ea47086c00b2142fe8772a562198fb24ef69c24a..d5d9bbca2a9c6eb084317bb4bf08951ade054475 100644
|
| --- a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/wpt_expectations_updater.py
|
| +++ b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/wpt_expectations_updater.py
|
| @@ -201,7 +201,8 @@ class WPTExpectationsUpdater(object):
|
| matching_value_keys = set()
|
| return merged_dict
|
|
|
| - def get_expectations(self, results):
|
| + def get_expectations(self, results, test_name=''):
|
| +
|
| """Returns a set of test expectations to use based on results.
|
|
|
| Returns a set of one or more test expectations based on the expected
|
| @@ -217,11 +218,21 @@ class WPTExpectationsUpdater(object):
|
| 'bug': 'crbug.com/11111'
|
| }
|
| }
|
| + test_name: The test name string (optional).
|
|
|
| Returns:
|
| A set of one or more test expectation strings with the first letter
|
| capitalized. Example: set(['Failure', 'Timeout']).
|
| """
|
| + # If the result is MISSING, this implies that the test was not
|
| + # rebaselined and has an actual result but no baseline. We can't
|
| + # add a Missing expectation (this is not allowed), but no other
|
| + # expectation is correct.
|
| + # We also want to skip any new manual tests that are not automated;
|
| + # see crbug.com/708241 for context.
|
| + if (results['actual'] == 'MISSING' or
|
| + '-manual.' in test_name and results['actual'] == 'TIMEOUT'):
|
| + return {'Skip'}
|
| expectations = set()
|
| failure_types = ('TEXT', 'IMAGE+TEXT', 'IMAGE', 'AUDIO')
|
| other_types = ('TIMEOUT', 'CRASH', 'PASS')
|
| @@ -269,12 +280,8 @@ class WPTExpectationsUpdater(object):
|
| if specifier_part:
|
| line_parts.append(specifier_part)
|
| line_parts.append(test_name)
|
| + line_parts.append('[ %s ]' % ' '.join(self.get_expectations(results, test_name)))
|
|
|
| - # Skip new manual tests; see crbug.com/708241 for context.
|
| - if '-manual.' in test_name and results['actual'] in ('MISSING', 'TIMEOUT'):
|
| - line_parts.append('[ Skip ]')
|
| - else:
|
| - line_parts.append('[ %s ]' % ' '.join(self.get_expectations(results)))
|
| return ' '.join(line_parts)
|
|
|
| def specifier_part(self, port_names, test_name):
|
|
|