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

Side by Side Diff: chrome/browser/PRESUBMIT.py

Issue 1378993003: Vulcanize new Material Design downloads UI (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@vulcanize2
Patch Set: -crisper.html Created 5 years, 2 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/browser_resources.grd » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Presubmit script for Chromium browser code. 5 """Presubmit script for Chromium browser code.
6 6
7 This script currently checks HTML/CSS/JS files in resources/ and ui/webui/. 7 This script currently checks HTML/CSS/JS files in resources/ and ui/webui/.
8 8
9 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts 9 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
10 for more details about the presubmit API built into depot_tools, and see 10 for more details about the presubmit API built into depot_tools, and see
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 48
49 try: 49 try:
50 sys.path = [cwd] + old_path 50 sys.path = [cwd] + old_path
51 from web_dev_style import (resource_checker, css_checker, html_checker, 51 from web_dev_style import (resource_checker, css_checker, html_checker,
52 js_checker) 52 js_checker)
53 53
54 search_dirs = (resources, webui) 54 search_dirs = (resources, webui)
55 def _html_css_js_resource(p): 55 def _html_css_js_resource(p):
56 return p.endswith(('.html', '.css', '.js')) and p.startswith(search_dirs) 56 return p.endswith(('.html', '.css', '.js')) and p.startswith(search_dirs)
57 57
58 BLACKLIST = ['chrome/browser/resources/pdf/index.html', 58 BLACKLIST = ['chrome/browser/resources/md_downloads/crisper.js',
59 'chrome/browser/resources/md_downloads/vulcanized.html',
60 'chrome/browser/resources/pdf/index.html',
59 'chrome/browser/resources/pdf/index.js'] 61 'chrome/browser/resources/pdf/index.js']
60 def is_resource(maybe_resource): 62 def is_resource(maybe_resource):
61 return (maybe_resource.LocalPath() not in BLACKLIST and 63 return (maybe_resource.LocalPath() not in BLACKLIST and
62 _html_css_js_resource(maybe_resource.AbsoluteLocalPath())) 64 _html_css_js_resource(maybe_resource.AbsoluteLocalPath()))
63 65
64 results.extend(resource_checker.ResourceChecker( 66 results.extend(resource_checker.ResourceChecker(
65 input_api, output_api, file_filter=is_resource).RunChecks()) 67 input_api, output_api, file_filter=is_resource).RunChecks())
66 results.extend(css_checker.CSSChecker( 68 results.extend(css_checker.CSSChecker(
67 input_api, output_api, file_filter=is_resource).RunChecks()) 69 input_api, output_api, file_filter=is_resource).RunChecks())
68 results.extend(html_checker.HtmlChecker( 70 results.extend(html_checker.HtmlChecker(
69 input_api, output_api, file_filter=is_resource).RunChecks()) 71 input_api, output_api, file_filter=is_resource).RunChecks())
70 results.extend(js_checker.JSChecker( 72 results.extend(js_checker.JSChecker(
71 input_api, output_api, file_filter=is_resource).RunChecks()) 73 input_api, output_api, file_filter=is_resource).RunChecks())
72 finally: 74 finally:
73 sys.path = old_path 75 sys.path = old_path
74 76
75 return results 77 return results
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/browser_resources.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698