| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright 2015 The Chromium Authors. All rights reserved. | 2 # Copyright 2015 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 js_checker | 6 import js_checker |
| 7 from os import path as os_path | 7 from os import path as os_path |
| 8 import re | 8 import re |
| 9 from sys import path as sys_path | 9 from sys import path as sys_path |
| 10 import test_util | 10 import test_util |
| 11 import unittest | 11 import unittest |
| 12 | 12 |
| 13 _HERE = os_path.dirname(os_path.abspath(__file__)) | 13 _HERE = os_path.dirname(os_path.abspath(__file__)) |
| 14 sys_path.append(os_path.join(_HERE, '..', '..', '..', 'tools')) | 14 sys_path.append(os_path.join(_HERE, '..', '..', '..', 'build')) |
| 15 | 15 |
| 16 import find_depot_tools # pylint: disable=W0611 | 16 import find_depot_tools # pylint: disable=W0611 |
| 17 from testing_support.super_mox import SuperMoxTestBase | 17 from testing_support.super_mox import SuperMoxTestBase |
| 18 | 18 |
| 19 | 19 |
| 20 class JsCheckerTest(SuperMoxTestBase): | 20 class JsCheckerTest(SuperMoxTestBase): |
| 21 def setUp(self): | 21 def setUp(self): |
| 22 SuperMoxTestBase.setUp(self) | 22 SuperMoxTestBase.setUp(self) |
| 23 | 23 |
| 24 input_api = self.mox.CreateMockAnything() | 24 input_api = self.mox.CreateMockAnything() |
| (...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 " var SCARE_SMALL_CHILDREN = [", # TODO(dbeam): add @const in | 320 " var SCARE_SMALL_CHILDREN = [", # TODO(dbeam): add @const in |
| 321 # front of all these vars like | 321 # front of all these vars like |
| 322 "/** @const */ CONST_VAR = 1;", # this line has (<--). | 322 "/** @const */ CONST_VAR = 1;", # this line has (<--). |
| 323 ] | 323 ] |
| 324 for line in lines: | 324 for line in lines: |
| 325 self.ShouldPassVarNameCheck(line) | 325 self.ShouldPassVarNameCheck(line) |
| 326 | 326 |
| 327 | 327 |
| 328 if __name__ == '__main__': | 328 if __name__ == '__main__': |
| 329 unittest.main() | 329 unittest.main() |
| OLD | NEW |