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

Side by Side Diff: Tools/Scripts/webkitpy/style/checkers/test_expectations.py

Issue 20830003: Get rid of the distinction between modifiers and expectations. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: clean up a couple things Created 7 years, 4 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 | Annotate | Revision Log
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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 self._port_obj = host.port_factory.get() 59 self._port_obj = host.port_factory.get()
60 60
61 # Suppress error messages of test_expectations module since they will be reported later. 61 # Suppress error messages of test_expectations module since they will be reported later.
62 log = logging.getLogger("webkitpy.layout_tests.layout_package.test_expec tations") 62 log = logging.getLogger("webkitpy.layout_tests.layout_package.test_expec tations")
63 log.setLevel(logging.CRITICAL) 63 log.setLevel(logging.CRITICAL)
64 64
65 def _handle_error_message(self, lineno, message, confidence): 65 def _handle_error_message(self, lineno, message, confidence):
66 pass 66 pass
67 67
68 def check_test_expectations(self, expectations_str, tests=None): 68 def check_test_expectations(self, expectations_str, tests=None):
69 parser = TestExpectationParser(self._port_obj, tests, allow_rebaseline_m odifier=False) 69 parser = TestExpectationParser(self._port_obj, tests, allow_rebaseline=F alse)
70 expectations = parser.parse('expectations', expectations_str) 70 expectations = parser.parse('expectations', expectations_str)
71 71
72 level = 5 72 level = 5
73 for expectation_line in expectations: 73 for expectation_line in expectations:
74 for warning in expectation_line.warnings: 74 for warning in expectation_line.warnings:
75 self._handle_style_error(expectation_line.line_numbers, 'test/ex pectations', level, warning) 75 self._handle_style_error(expectation_line.line_numbers, 'test/ex pectations', level, warning)
76 76
77 def check_tabs(self, lines): 77 def check_tabs(self, lines):
78 self._tab_checker.check(lines) 78 self._tab_checker.check(lines)
79 79
80 def check(self, lines): 80 def check(self, lines):
81 expectations = '\n'.join(lines) 81 expectations = '\n'.join(lines)
82 if self._port_obj: 82 if self._port_obj:
83 self.check_test_expectations(expectations_str=expectations, tests=No ne) 83 self.check_test_expectations(expectations_str=expectations, tests=No ne)
84 84
85 # Warn tabs in lines as well 85 # Warn tabs in lines as well
86 self.check_tabs(lines) 86 self.check_tabs(lines)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698