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

Side by Side Diff: PRESUBMIT.py

Issue 1160113004: HTML exit reader view button (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: clean up Created 5 years, 6 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 | build/ios/grit_whitelist.txt » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 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 """Top-level presubmit script for Chromium. 5 """Top-level presubmit script for Chromium.
6 6
7 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts 7 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
8 for more details about the presubmit API built into depot_tools. 8 for more details about the presubmit API built into depot_tools.
9 """ 9 """
10 10
(...skipping 1392 matching lines...) Expand 10 before | Expand all | Expand 10 after
1403 ( "-webkit-repeating-gradient", "repeating-gradient" ), 1403 ( "-webkit-repeating-gradient", "repeating-gradient" ),
1404 ( "-webkit-linear-gradient", "linear-gradient" ), 1404 ( "-webkit-linear-gradient", "linear-gradient" ),
1405 ( "-webkit-repeating-linear-gradient", "repeating-linear-gradient" ), 1405 ( "-webkit-repeating-linear-gradient", "repeating-linear-gradient" ),
1406 ( "-webkit-radial-gradient", "radial-gradient" ), 1406 ( "-webkit-radial-gradient", "radial-gradient" ),
1407 ( "-webkit-repeating-radial-gradient", "repeating-radial-gradient" ), 1407 ( "-webkit-repeating-radial-gradient", "repeating-radial-gradient" ),
1408 ] 1408 ]
1409 1409
1410 def _CheckNoDeprecatedCSS(input_api, output_api): 1410 def _CheckNoDeprecatedCSS(input_api, output_api):
1411 """ Make sure that we don't use deprecated CSS 1411 """ Make sure that we don't use deprecated CSS
1412 properties, functions or values. Our external 1412 properties, functions or values. Our external
1413 documentation is ignored by the hooks as it 1413 documentation and iOS CSS for dom distiller
1414 (reader mode) are ignored by the hooks as it
1414 needs to be consumed by WebKit. """ 1415 needs to be consumed by WebKit. """
1415 results = [] 1416 results = []
1416 file_inclusion_pattern = (r".+\.css$",) 1417 file_inclusion_pattern = (r".+\.css$",)
1417 black_list = (_EXCLUDED_PATHS + 1418 black_list = (_EXCLUDED_PATHS +
1418 _TEST_CODE_EXCLUDED_PATHS + 1419 _TEST_CODE_EXCLUDED_PATHS +
1419 input_api.DEFAULT_BLACK_LIST + 1420 input_api.DEFAULT_BLACK_LIST +
1420 (r"^chrome/common/extensions/docs", 1421 (r"^chrome/common/extensions/docs",
1421 r"^chrome/docs", 1422 r"^chrome/docs",
1423 r"^components/dom_distiller/core/css/distilledpage_ios.css",
1422 r"^native_client_sdk")) 1424 r"^native_client_sdk"))
1423 file_filter = lambda f: input_api.FilterSourceFile( 1425 file_filter = lambda f: input_api.FilterSourceFile(
1424 f, white_list=file_inclusion_pattern, black_list=black_list) 1426 f, white_list=file_inclusion_pattern, black_list=black_list)
1425 for fpath in input_api.AffectedFiles(file_filter=file_filter): 1427 for fpath in input_api.AffectedFiles(file_filter=file_filter):
1426 for line_num, line in fpath.ChangedContents(): 1428 for line_num, line in fpath.ChangedContents():
1427 for (deprecated_value, value) in _DEPRECATED_CSS: 1429 for (deprecated_value, value) in _DEPRECATED_CSS:
1428 if deprecated_value in line: 1430 if deprecated_value in line:
1429 results.append(output_api.PresubmitError( 1431 results.append(output_api.PresubmitError(
1430 "%s:%d: Use of deprecated CSS %s, use %s instead" % 1432 "%s:%d: Use of deprecated CSS %s, use %s instead" %
1431 (fpath.LocalPath(), line_num, deprecated_value, value))) 1433 (fpath.LocalPath(), line_num, deprecated_value, value)))
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
1808 # (e.g. OWNERS checks before finished code review), and we're 1810 # (e.g. OWNERS checks before finished code review), and we're
1809 # running local presubmit anyway. 1811 # running local presubmit anyway.
1810 if 'presubmit' in builder: 1812 if 'presubmit' in builder:
1811 masters[master].pop(builder) 1813 masters[master].pop(builder)
1812 else: 1814 else:
1813 # Convert testfilter format to the one expected by git-cl-try. 1815 # Convert testfilter format to the one expected by git-cl-try.
1814 testfilter = masters[master][builder].get('testfilter', 'defaulttests') 1816 testfilter = masters[master][builder].get('testfilter', 'defaulttests')
1815 masters[master][builder] = [testfilter] 1817 masters[master][builder] = [testfilter]
1816 1818
1817 return masters 1819 return masters
OLDNEW
« no previous file with comments | « no previous file | build/ios/grit_whitelist.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698