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

Side by Side Diff: third_party/WebKit/LayoutTests/PRESUBMIT.py

Issue 2844803005: Add a doc in the presubmit script checking if layout tests use eventSender (Closed)
Patch Set: comments Created 3 years, 7 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 | no next file » | 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) 2013 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2013 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 """LayoutTests/ presubmit script for Blink. 5 """LayoutTests/ presubmit script for Blink.
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 gcl. 8 for more details about the presubmit API built into gcl.
9 """ 9 """
10 10
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 """Check if any new layout tests still use eventSender. If they do, we encou rage replacing them with 91 """Check if any new layout tests still use eventSender. If they do, we encou rage replacing them with
92 chrome.gpuBenchmarking.pointerActionSequence. 92 chrome.gpuBenchmarking.pointerActionSequence.
93 """ 93 """
94 results = [] 94 results = []
95 actions = ["eventSender.touch", "eventSender.mouse", "eventSender.gesture"] 95 actions = ["eventSender.touch", "eventSender.mouse", "eventSender.gesture"]
96 for f in input_api.AffectedFiles(): 96 for f in input_api.AffectedFiles():
97 if f.Action() == 'A': 97 if f.Action() == 'A':
98 for line_num, line in f.ChangedContents(): 98 for line_num, line in f.ChangedContents():
99 if any(action in line for action in actions): 99 if any(action in line for action in actions):
100 results.append(output_api.PresubmitError( 100 results.append(output_api.PresubmitError(
101 'Files that still use eventSender: %s:%d %s, please use chrome.gpuBenchmarking.pointerActionSequence instead.' % 101 'eventSender is deprecated, please use chrome.gpuBenchma rking.pointerActionSequence instead ' +
102 (f.LocalPath(), line_num, line))) 102 '(see https://crbug.com/711340 and http://goo.gl/BND75q) .\n' +
103 'Files: %s:%d %s ' % (f.LocalPath(), line_num, line)))
103 return results 104 return results
104 105
105 106
106 def CheckChangeOnUpload(input_api, output_api): 107 def CheckChangeOnUpload(input_api, output_api):
107 results = [] 108 results = []
108 results.extend(_CheckTestharnessResults(input_api, output_api)) 109 results.extend(_CheckTestharnessResults(input_api, output_api))
109 results.extend(_CheckIdenticalFiles(input_api, output_api)) 110 results.extend(_CheckIdenticalFiles(input_api, output_api))
110 results.extend(_CheckFilesUsingEventSender(input_api, output_api)) 111 results.extend(_CheckFilesUsingEventSender(input_api, output_api))
111 return results 112 return results
112 113
113 114
114 def CheckChangeOnCommit(input_api, output_api): 115 def CheckChangeOnCommit(input_api, output_api):
115 results = [] 116 results = []
116 results.extend(_CheckTestharnessResults(input_api, output_api)) 117 results.extend(_CheckTestharnessResults(input_api, output_api))
117 results.extend(_CheckIdenticalFiles(input_api, output_api)) 118 results.extend(_CheckIdenticalFiles(input_api, output_api))
118 results.extend(_CheckFilesUsingEventSender(input_api, output_api)) 119 results.extend(_CheckFilesUsingEventSender(input_api, output_api))
119 return results 120 return results
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698