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

Unified Diff: PRESUBMIT.py

Issue 457893003: Remove unknown preferences errors in layout tests (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Re-add testRunner.waitUntilDone() calls that were wrongly removed. Created 6 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 | « LayoutTests/platform/win/css3/filters/effect-sepia-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: PRESUBMIT.py
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index e4a205e9f9900b921d42f7698cdb46872be27bb2..ba0c2443397f2edf15a661ba63523f35da4fbcc7 100644
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -308,12 +308,26 @@ def _CheckFilePermissions(input_api, output_api):
return []
+def _CheckForInvalidPreferenceError(input_api, output_api):
+ pattern = input_api.re.compile('Invalid name for preference: (.+)')
+ results = []
+
+ for f in input_api.AffectedFiles():
+ if not f.LocalPath().endswith('-expected.txt'):
+ continue
+ for line_num, line in f.ChangedContents():
+ error = pattern.search(line)
+ if error:
+ results.append(output_api.PresubmitError('Found an invalid preference %s in expected result %s:%s' % (error.group(1), f, line_num)))
+ return results
+
def CheckChangeOnUpload(input_api, output_api):
results = []
results.extend(_CommonChecks(input_api, output_api))
results.extend(_CheckStyle(input_api, output_api))
results.extend(_CheckForPrintfDebugging(input_api, output_api))
results.extend(_CheckForDangerousTestFunctions(input_api, output_api))
+ results.extend(_CheckForInvalidPreferenceError(input_api, output_api))
return results
« no previous file with comments | « LayoutTests/platform/win/css3/filters/effect-sepia-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698