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

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py

Issue 1624373005: Remove XP port from Blink LayoutTest related scripts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync to head. Created 4 years, 10 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 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 return 224 return
225 225
226 # this is a test file, do a quick check if it's in the 226 # this is a test file, do a quick check if it's in the
227 # full test suite. 227 # full test suite.
228 if expectation_line.path in self._all_tests: 228 if expectation_line.path in self._all_tests:
229 expectation_line.matching_tests.append(expectation_line.path) 229 expectation_line.matching_tests.append(expectation_line.path)
230 230
231 # FIXME: Update the original specifiers and remove this once the old syntax is gone. 231 # FIXME: Update the original specifiers and remove this once the old syntax is gone.
232 _configuration_tokens_list = [ 232 _configuration_tokens_list = [
233 'Mac', 'Mac10.6', 'Mac10.7', 'Mac10.8', 'Mac10.9', 'Mac10.10', 'Retina', 233 'Mac', 'Mac10.6', 'Mac10.7', 'Mac10.8', 'Mac10.9', 'Mac10.10', 'Retina',
234 'Win', 'XP', 'Win7', 'Win10', 234 'Win', 'Win7', 'Win10',
235 'Linux', 'Linux32', 'Precise', 'Trusty', 235 'Linux', 'Linux32', 'Precise', 'Trusty',
236 'Android', 236 'Android',
237 'Release', 237 'Release',
238 'Debug', 238 'Debug',
239 ] 239 ]
240 240
241 _configuration_tokens = dict((token, token.upper()) for token in _configurat ion_tokens_list) 241 _configuration_tokens = dict((token, token.upper()) for token in _configurat ion_tokens_list)
242 _inverted_configuration_tokens = dict((value, name) for name, value in _conf iguration_tokens.iteritems()) 242 _inverted_configuration_tokens = dict((value, name) for name, value in _conf iguration_tokens.iteritems())
243 243
244 # FIXME: Update the original specifiers list and remove this once the old sy ntax is gone. 244 # FIXME: Update the original specifiers list and remove this once the old sy ntax is gone.
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 self.specifiers = [] 404 self.specifiers = []
405 self.parsed_specifiers = [] 405 self.parsed_specifiers = []
406 self.matching_configurations = set() 406 self.matching_configurations = set()
407 self.expectations = [] 407 self.expectations = []
408 self.parsed_expectations = set() 408 self.parsed_expectations = set()
409 self.comment = None 409 self.comment = None
410 self.matching_tests = [] 410 self.matching_tests = []
411 self.warnings = [] 411 self.warnings = []
412 self.is_skipped_outside_expectations_file = False 412 self.is_skipped_outside_expectations_file = False
413 413
414 def __str__(self):
415 return "TestExpectationLine{name=%s, matching_configurations=%s, origina l_string=%s}" % (self.name, self.matching_configurations, self.original_string)
416
414 def __eq__(self, other): 417 def __eq__(self, other):
415 return (self.original_string == other.original_string 418 return (self.original_string == other.original_string
416 and self.filename == other.filename 419 and self.filename == other.filename
417 and self.line_numbers == other.line_numbers 420 and self.line_numbers == other.line_numbers
418 and self.name == other.name 421 and self.name == other.name
419 and self.path == other.path 422 and self.path == other.path
420 and self.bugs == other.bugs 423 and self.bugs == other.bugs
421 and self.specifiers == other.specifiers 424 and self.specifiers == other.specifiers
422 and self.parsed_specifiers == other.parsed_specifiers 425 and self.parsed_specifiers == other.parsed_specifiers
423 and self.matching_configurations == other.matching_configurations 426 and self.matching_configurations == other.matching_configurations
(...skipping 737 matching lines...) Expand 10 before | Expand all | Expand 10 after
1161 # If reconstitute_only_these is an empty list, we want to return ori ginal_string. 1164 # If reconstitute_only_these is an empty list, we want to return ori ginal_string.
1162 # So we need to compare reconstitute_only_these to None, not just ch eck if it's falsey. 1165 # So we need to compare reconstitute_only_these to None, not just ch eck if it's falsey.
1163 if reconstitute_only_these is None or expectation_line in reconstitu te_only_these: 1166 if reconstitute_only_these is None or expectation_line in reconstitu te_only_these:
1164 return expectation_line.to_string(test_configuration_converter) 1167 return expectation_line.to_string(test_configuration_converter)
1165 return expectation_line.original_string 1168 return expectation_line.original_string
1166 1169
1167 def nones_out(expectation_line): 1170 def nones_out(expectation_line):
1168 return expectation_line is not None 1171 return expectation_line is not None
1169 1172
1170 return "\n".join(filter(nones_out, map(serialize, expectation_lines))) 1173 return "\n".join(filter(nones_out, map(serialize, expectation_lines)))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698