OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright 2014 The Chromium Authors. All rights reserved. | 2 # Copyright 2014 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 import os | 6 import os |
7 import unittest | 7 import unittest |
8 | 8 |
9 from checker import Checker | 9 from checker import Checker |
10 from processor import FileCache, Processor | 10 from processor import FileCache, Processor |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 | 180 |
181 cr.defineProperty(Class.prototype, 'booleanProp', cr.PropertyKind.BOOL_ATTR); | 181 cr.defineProperty(Class.prototype, 'booleanProp', cr.PropertyKind.BOOL_ATTR); |
182 | 182 |
183 /** @param {number} num */ | 183 /** @param {number} num */ |
184 function needsNumber(num) {} | 184 function needsNumber(num) {} |
185 | 185 |
186 needsNumber(new Class().booleanProp); | 186 needsNumber(new Class().booleanProp); |
187 """, "ERROR - actual parameter 1 of needsNumber does not match formal " | 187 """, "ERROR - actual parameter 1 of needsNumber does not match formal " |
188 "parameter") | 188 "parameter") |
189 | 189 |
| 190 def testCrDefineOnCrWorks(self): |
| 191 self._runCheckerTestExpectSuccess(self._CR_DEFINE_DEFINITION + """ |
| 192 cr.define('cr', function() { |
| 193 return {}; |
| 194 }); |
| 195 """) |
| 196 |
190 | 197 |
191 if __name__ == "__main__": | 198 if __name__ == "__main__": |
192 unittest.main() | 199 unittest.main() |
OLD | NEW |