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

Unified Diff: third_party/WebKit/Tools/Scripts/webkitpy/w3c/deps_updater.py

Issue 2132273002: Change DepsUpdater.is_manual_test to check wpt_automation directory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove print statement Created 4 years, 5 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 | third_party/WebKit/Tools/Scripts/webkitpy/w3c/deps_updater_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Tools/Scripts/webkitpy/w3c/deps_updater.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/deps_updater.py b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/deps_updater.py
index db9fda2c9e1a751d6788c5217fa9e1406f7a8ce1..03a437f53f0539bcf57b55949f534b0775d8225c 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/deps_updater.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/deps_updater.py
@@ -191,9 +191,23 @@ class DepsUpdater(object):
else:
self.print_('## Done: no changes to import.')
- def is_manual_test(self, fs, dirname, basename): # Callback for FileSystem.files_under; not all arguments used - pylint: disable=unused-argument
- # We are importing manual pointer event tests and we are automating them.
- return ("pointerevents" not in dirname) and (basename.endswith('-manual.html') or basename.endswith('-manual.htm'))
+ def is_manual_test(self, fs, dirname, basename):
+ """Returns True if the file should be removed because it's a manual test.
+
+ Tests with "-manual" in the name are not considered manual tests
+ if there is a corresponding JS automation file.
+ """
+ basename_without_extension, _ = basename.rsplit('.', 1)
+ if not basename_without_extension.endswith('-manual'):
+ return False
+ dir_from_wpt = fs.relpath(dirname, self.path_from_webkit_base('LayoutTests', 'imported', 'wpt'))
+ automation_dir = self.path_from_webkit_base('LayoutTests', 'imported', 'wpt_automation', dir_from_wpt)
+ # TODO(qyearsley): Update this when all *-input.js are renamed to *-automation.js.
+ if fs.isfile(fs.join(automation_dir, '%s-input.js' % basename_without_extension)):
+ return False
+ if fs.isfile(fs.join(automation_dir, '%s-automation.js' % basename_without_extension)):
+ return False
+ return True
def is_baseline(self, fs, dirname, basename): # Callback for FileSystem.files_under; not all arguments used - pylint: disable=unused-argument
return basename.endswith('-expected.txt')
« no previous file with comments | « no previous file | third_party/WebKit/Tools/Scripts/webkitpy/w3c/deps_updater_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698