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

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: s/for/filter/ 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
Index: chrome/browser/resources/PRESUBMIT.py
diff --git a/chrome/browser/resources/PRESUBMIT.py b/chrome/browser/resources/PRESUBMIT.py
index 292836a15b5e832f6bdcfb95e8110f2ab67a3b25..846c40e4957a9ab4a2c9ac8dde5a41552f1dbe48 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 filter(lambda t: t in affected_files, would_affect_tests):
Dirk Pranke 2012/03/22 03:05:30 nit: I'd probably do if any(f for f in affected_fi
Dan Beam 2012/03/22 03:19:31 Done. (I have little to no idea what I just did th
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') | chrome/browser/resources/web_dev_style/css_checker.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698