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

Side by Side Diff: third_party/closure_compiler/compiler_customization_test.py

Issue 453783006: Handle cr.exportPath() in compiler pass, declare every object only once (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@C_define_property
Patch Set: rebase Created 6 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
OLDNEW
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
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()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698