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

Unified Diff: chrome/browser/resources/PRESUBMIT.py

Issue 9808002: [WebUI] Make CSS presubmit play nice with grit XML. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: dpranke review Created 8 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/resources/test_presubmit.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/PRESUBMIT.py
diff --git a/chrome/browser/resources/PRESUBMIT.py b/chrome/browser/resources/PRESUBMIT.py
index 292836a15b5e832f6bdcfb95e8110f2ab67a3b25..76f08ad62e4f450663ddf1c6b6e9fe6427d04e76 100644
--- a/chrome/browser/resources/PRESUBMIT.py
+++ b/chrome/browser/resources/PRESUBMIT.py
@@ -25,8 +25,14 @@ def _CommonChecks(input_api, output_api):
resources = input_api.PresubmitLocalPath()
path = input_api.os_path
- presubmit = path.join(resources, 'PRESUBMIT.py')
- if presubmit in (f.AbsoluteLocalPath() for f in input_api.AffectedFiles()):
+ affected_files = (f.AbsoluteLocalPath() for f in input_api.AffectedFiles())
+ would_affect_tests = (
+ path.join(resources, 'PRESUBMIT.py'),
+ path.join(resources, 'test_presubmit.py'),
+ path.join(resources, 'web_dev_style', 'css_checker.py'),
+ path.join(resources, 'web_dev_style', 'js_checker.py'),
+ )
+ if any(f for f in affected_files if f in would_affect_tests):
tests = [path.join(resources, 'test_presubmit.py')]
results.extend(
input_api.canned_checks.RunUnitTests(input_api, output_api, tests))
« no previous file with comments | « no previous file | chrome/browser/resources/test_presubmit.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698