| OLD | NEW |
| 1 # Copyright (C) 2014 Google Inc. All rights reserved. | 1 # Copyright (C) 2014 Google 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 are | 4 # modification, are permitted provided that the following conditions are |
| 5 # met: | 5 # met: |
| 6 # | 6 # |
| 7 # * Redistributions of source code must retain the above copyright | 7 # * Redistributions of source code must retain the above copyright |
| 8 # notice, this list of conditions and the following disclaimer. | 8 # notice, this list of conditions and the following disclaimer. |
| 9 # * Redistributions in binary form must reproduce the above | 9 # * Redistributions in binary form must reproduce the above |
| 10 # copyright notice, this list of conditions and the following disclaimer | 10 # copyright notice, this list of conditions and the following disclaimer |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 import sys | 35 import sys |
| 36 | 36 |
| 37 compile_note = "Be sure to run your patch by the compile_frontend.py script prio
r to committing!" | 37 compile_note = "Be sure to run your patch by the compile_frontend.py script prio
r to committing!" |
| 38 | 38 |
| 39 def _CompileDevtoolsFrontend(input_api, output_api): | 39 def _CompileDevtoolsFrontend(input_api, output_api): |
| 40 local_paths = [f.LocalPath() for f in input_api.AffectedFiles()] | 40 local_paths = [f.LocalPath() for f in input_api.AffectedFiles()] |
| 41 | 41 |
| 42 # FIXME: The compilation does not actually run if injected script-related fi
les | 42 # FIXME: The compilation does not actually run if injected script-related fi
les |
| 43 # have changed, as they reside in core/inspector, which is not affected | 43 # have changed, as they reside in core/inspector, which is not affected |
| 44 # by this presubmit. | 44 # by this presubmit. |
| 45 # Once this is fixed, InjectedScriptHost.idl and JavaScriptCallFrame.idl | 45 # Once this is fixed, injected_script_externs.js |
| 46 # should be added to the list of triggers. | 46 # should be added to the list of triggers. |
| 47 devtools_front_end = input_api.os_path.join("devtools", "front_end") | 47 devtools_front_end = input_api.os_path.join("devtools", "front_end") |
| 48 if (any(devtools_front_end in path for path in local_paths) or | 48 if (any(devtools_front_end in path for path in local_paths) or |
| 49 any("protocol.json" in path for path in local_paths) or | 49 any("protocol.json" in path for path in local_paths) or |
| 50 any("compile_frontend.py" in path for path in local_paths) or | 50 any("compile_frontend.py" in path for path in local_paths) or |
| 51 any("InjectedScriptSource.js" in path for path in local_paths)): | 51 any("InjectedScriptSource.js" in path for path in local_paths)): |
| 52 lint_path = input_api.os_path.join(input_api.PresubmitLocalPath(), | 52 lint_path = input_api.os_path.join(input_api.PresubmitLocalPath(), |
| 53 "scripts", "compile_frontend.py") | 53 "scripts", "compile_frontend.py") |
| 54 out, _ = input_api.subprocess.Popen( | 54 out, _ = input_api.subprocess.Popen( |
| 55 [input_api.python_executable, lint_path], | 55 [input_api.python_executable, lint_path], |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 results = [] | 131 results = [] |
| 132 results.extend(_CompileDevtoolsFrontend(input_api, output_api)) | 132 results.extend(_CompileDevtoolsFrontend(input_api, output_api)) |
| 133 results.extend(_CheckConvertSVGToPNGHashes(input_api, output_api)) | 133 results.extend(_CheckConvertSVGToPNGHashes(input_api, output_api)) |
| 134 results.extend(_CheckOptimizePNGHashes(input_api, output_api)) | 134 results.extend(_CheckOptimizePNGHashes(input_api, output_api)) |
| 135 results.extend(_CheckCSSViolations(input_api, output_api)) | 135 results.extend(_CheckCSSViolations(input_api, output_api)) |
| 136 return results | 136 return results |
| 137 | 137 |
| 138 | 138 |
| 139 def CheckChangeOnCommit(input_api, output_api): | 139 def CheckChangeOnCommit(input_api, output_api): |
| 140 return [] | 140 return [] |
| OLD | NEW |