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

Unified Diff: chrome/browser/web_dev_style/css_checker.py

Issue 2261523005: Presubmit test for overriding properties generated by Polymer mixin shim (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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/web_dev_style/css_checker_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/web_dev_style/css_checker.py
diff --git a/chrome/browser/web_dev_style/css_checker.py b/chrome/browser/web_dev_style/css_checker.py
index 93897e92dd8427f96acf5f7266e43132c0e06beb..77f610f4db804a7f0c0e52f8400ad54333d9de5d 100644
--- a/chrome/browser/web_dev_style/css_checker.py
+++ b/chrome/browser/web_dev_style/css_checker.py
@@ -169,6 +169,9 @@ class CSSChecker(object):
def no_data_uris_in_source_files(line):
return re.search(r'\(\s*\s*data:', line)
+ def no_mixin_shims(line):
+ return re.search('\-\-[\w\-]+_\-_[\w\-]+\s*:', line)
+
def no_quotes_in_url(line):
return re.search('url\s*\(\s*["\']', line, re.IGNORECASE)
@@ -346,6 +349,10 @@ class CSSChecker(object):
{ 'desc': "Don't use data URIs in source files. Use grit instead.",
'test': no_data_uris_in_source_files,
},
+ { 'desc': "Don't override custom properties created by Polymer's mixin "
+ "shim. Set mixins or documented custom properties directly.",
+ 'test': no_mixin_shims,
+ },
{ 'desc': "Don't use quotes in url().",
'test': no_quotes_in_url,
},
« no previous file with comments | « no previous file | chrome/browser/web_dev_style/css_checker_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698