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

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/style/checkers/jsonchecker_unittest.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 Apple Inc. All rights reserved. 1 # Copyright (C) 2010 Apple 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 4 # modification, are permitted provided that the following conditions
5 # are met: 5 # are met:
6 # 1. Redistributions of source code must retain the above copyright 6 # 1. Redistributions of source code must retain the above copyright
7 # notice, this list of conditions and the following disclaimer. 7 # notice, this list of conditions and the following disclaimer.
8 # 2. Redistributions in binary form must reproduce the above copyright 8 # 2. Redistributions in binary form must reproduce the above copyright
9 # notice, this list of conditions and the following disclaimer in the 9 # notice, this list of conditions and the following disclaimer in the
10 # documentation and/or other materials provided with the distribution. 10 # documentation and/or other materials provided with the distribution.
(...skipping 24 matching lines...) Expand all
35 35
36 def turn_off_line_filtering(self): 36 def turn_off_line_filtering(self):
37 self.turned_off_filtering = True 37 self.turned_off_filtering = True
38 38
39 def __call__(self, line_number, category, confidence, message): 39 def __call__(self, line_number, category, confidence, message):
40 self._handle_style_error(self, line_number, category, confidence, messag e) 40 self._handle_style_error(self, line_number, category, confidence, messag e)
41 return True 41 return True
42 42
43 43
44 class JSONCheckerTest(unittest.TestCase): 44 class JSONCheckerTest(unittest.TestCase):
45
45 """Tests JSONChecker class.""" 46 """Tests JSONChecker class."""
46 47
47 def test_line_number_from_json_exception(self): 48 def test_line_number_from_json_exception(self):
48 tests = ( 49 tests = (
49 (0, 'No JSON object could be decoded'), 50 (0, 'No JSON object could be decoded'),
50 (2, 'Expecting property name: line 2 column 1 (char 2)'), 51 (2, 'Expecting property name: line 2 column 1 (char 2)'),
51 (3, 'Expecting object: line 3 column 1 (char 15)'), 52 (3, 'Expecting object: line 3 column 1 (char 15)'),
52 (9, 'Expecting property name: line 9 column 21 (char 478)'), 53 (9, 'Expecting property name: line 9 column 21 (char 478)'),
53 ) 54 )
54 for expected_line, message in tests: 55 for expected_line, message in tests:
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 "slavenames": ["apple-xserve-4"] 104 "slavenames": ["apple-xserve-4"]
104 } 105 }
105 ], 106 ],
106 107
107 "schedulers": [ { "type": "PlatformSpecificScheduler", "platform": "mac-snow leopard", "branch": "trunk", "treeStableTimer": 45.0, 108 "schedulers": [ { "type": "PlatformSpecificScheduler", "platform": "mac-snow leopard", "branch": "trunk", "treeStableTimer": 45.0,
108 "builderNames": ["SnowLeopard Intel Release (Build)", "Sno wLeopard Intel Debug (Build)"] 109 "builderNames": ["SnowLeopard Intel Release (Build)", "Sno wLeopard Intel Debug (Build)"]
109 } 110 }
110 ] 111 ]
111 } 112 }
112 """) 113 """)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698