| OLD | NEW |
| 1 # -*- coding: utf-8; -*- | 1 # -*- coding: utf-8; -*- |
| 2 # | 2 # |
| 3 # Copyright (C) 2009 Google Inc. All rights reserved. | 3 # Copyright (C) 2009 Google Inc. All rights reserved. |
| 4 # Copyright (C) 2009 Torch Mobile Inc. | 4 # Copyright (C) 2009 Torch Mobile Inc. |
| 5 # Copyright (C) 2009 Apple Inc. All rights reserved. | 5 # Copyright (C) 2009 Apple Inc. All rights reserved. |
| 6 # Copyright (C) 2010 Chris Jerdonek (chris.jerdonek@gmail.com) | 6 # Copyright (C) 2010 Chris Jerdonek (chris.jerdonek@gmail.com) |
| 7 # | 7 # |
| 8 # Redistribution and use in source and binary forms, with or without | 8 # Redistribution and use in source and binary forms, with or without |
| 9 # modification, are permitted provided that the following conditions are | 9 # modification, are permitted provided that the following conditions are |
| 10 # met: | 10 # met: |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 class GlobalVariablesTest(unittest.TestCase): | 150 class GlobalVariablesTest(unittest.TestCase): |
| 151 | 151 |
| 152 """Tests validity of the global variables.""" | 152 """Tests validity of the global variables.""" |
| 153 | 153 |
| 154 def _all_categories(self): | 154 def _all_categories(self): |
| 155 return _all_categories() | 155 return _all_categories() |
| 156 | 156 |
| 157 def defaults(self): | 157 def defaults(self): |
| 158 return style._check_webkit_style_defaults() | 158 return style._check_webkit_style_defaults() |
| 159 | 159 |
| 160 def test_webkit_base_filter_rules(self): | 160 def test_blink_base_filter_rules(self): |
| 161 base_filter_rules = _BASE_FILTER_RULES | 161 base_filter_rules = _BASE_FILTER_RULES |
| 162 already_seen = [] | 162 already_seen = [] |
| 163 validate_filter_rules(base_filter_rules, self._all_categories()) | 163 validate_filter_rules(base_filter_rules, self._all_categories()) |
| 164 # Also do some additional checks. | 164 # Also do some additional checks. |
| 165 for rule in base_filter_rules: | 165 for rule in base_filter_rules: |
| 166 # Check no leading or trailing white space. | 166 # Check no leading or trailing white space. |
| 167 self.assertEqual(rule, rule.strip()) | 167 self.assertEqual(rule, rule.strip()) |
| 168 # All categories are on by default, so defaults should | 168 # All categories are on by default, so defaults should |
| 169 # begin with -. | 169 # begin with -. |
| 170 self.assertTrue(rule.startswith('-')) | 170 self.assertTrue(rule.startswith('-')) |
| (...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 803 """Test that carriage returns aren't stripped from files that are allowe
d to contain them.""" | 803 """Test that carriage returns aren't stripped from files that are allowe
d to contain them.""" |
| 804 file_path = 'carriage_returns_allowed.txt' | 804 file_path = 'carriage_returns_allowed.txt' |
| 805 lines = ['line1\r', 'line2\r'] | 805 lines = ['line1\r', 'line2\r'] |
| 806 line_numbers = [100] | 806 line_numbers = [100] |
| 807 self._processor.process(lines=lines, | 807 self._processor.process(lines=lines, |
| 808 file_path=file_path, | 808 file_path=file_path, |
| 809 line_numbers=line_numbers) | 809 line_numbers=line_numbers) |
| 810 # The carriage return checker should never have been invoked, and so | 810 # The carriage return checker should never have been invoked, and so |
| 811 # should not have saved off any lines. | 811 # should not have saved off any lines. |
| 812 self.assertFalse(hasattr(self.carriage_checker, 'lines')) | 812 self.assertFalse(hasattr(self.carriage_checker, 'lines')) |
| OLD | NEW |