OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 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.path | 6 import os.path |
7 import re | 7 import re |
8 import subprocess | 8 import subprocess |
9 import unittest | 9 import unittest |
10 | 10 |
(...skipping 1318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1329 self.assertEqual(1, len(warnings)) | 1329 self.assertEqual(1, len(warnings)) |
1330 | 1330 |
1331 def testArrowsAllowedInChromeCode(self): | 1331 def testArrowsAllowedInChromeCode(self): |
1332 mock_input_api = MockInputApi() | 1332 mock_input_api = MockInputApi() |
1333 mock_input_api.files = [ | 1333 mock_input_api.files = [ |
1334 MockAffectedFile('chrome/browser/resources/blah.js', 'arrow => OK here'), | 1334 MockAffectedFile('chrome/browser/resources/blah.js', 'arrow => OK here'), |
1335 ] | 1335 ] |
1336 warnings = PRESUBMIT._CheckForRiskyJsFeatures( | 1336 warnings = PRESUBMIT._CheckForRiskyJsFeatures( |
1337 mock_input_api, MockOutputApi()) | 1337 mock_input_api, MockOutputApi()) |
1338 self.assertEqual(0, len(warnings)) | 1338 self.assertEqual(0, len(warnings)) |
| 1339 self.assertEqual(1, 2) |
1339 | 1340 |
1340 | 1341 |
1341 if __name__ == '__main__': | 1342 if __name__ == '__main__': |
1342 unittest.main() | 1343 unittest.main() |
OLD | NEW |