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

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

Issue 2014063002: Run format-webkit on webkitpy code (without string conversion). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 21 matching lines...) Expand all
32 32
33 from common import TabChecker 33 from common import TabChecker
34 from webkitpy.common.host import Host 34 from webkitpy.common.host import Host
35 from webkitpy.layout_tests.models.test_expectations import TestExpectationParser 35 from webkitpy.layout_tests.models.test_expectations import TestExpectationParser
36 36
37 37
38 _log = logging.getLogger(__name__) 38 _log = logging.getLogger(__name__)
39 39
40 40
41 class TestExpectationsChecker(object): 41 class TestExpectationsChecker(object):
42
42 """Processes TestExpectations lines for validating the syntax.""" 43 """Processes TestExpectations lines for validating the syntax."""
43 44
44 categories = set(['test/expectations']) 45 categories = set(['test/expectations'])
45 46
46 def __init__(self, file_path, handle_style_error, host=None): 47 def __init__(self, file_path, handle_style_error, host=None):
47 self._file_path = file_path 48 self._file_path = file_path
48 self._handle_style_error = handle_style_error 49 self._handle_style_error = handle_style_error
49 self._tab_checker = TabChecker(file_path, handle_style_error) 50 self._tab_checker = TabChecker(file_path, handle_style_error)
50 51
51 # FIXME: host should be a required parameter, not an optional one. 52 # FIXME: host should be a required parameter, not an optional one.
(...skipping 21 matching lines...) Expand all
73 def check_tabs(self, lines): 74 def check_tabs(self, lines):
74 self._tab_checker.check(lines) 75 self._tab_checker.check(lines)
75 76
76 def check(self, lines): 77 def check(self, lines):
77 expectations = '\n'.join(lines) 78 expectations = '\n'.join(lines)
78 if self._port_obj: 79 if self._port_obj:
79 self.check_test_expectations(expectations_str=expectations, tests=No ne) 80 self.check_test_expectations(expectations_str=expectations, tests=No ne)
80 81
81 # Warn tabs in lines as well 82 # Warn tabs in lines as well
82 self.check_tabs(lines) 83 self.check_tabs(lines)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698