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

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

Issue 2302653002: Update list of resource files to copy from web-platform-tests. (Closed)
Patch Set: Update comments, move lists Created 4 years, 3 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 | « third_party/WebKit/LayoutTests/PRESUBMIT.py ('k') | no next file » | 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 1f0711860bac7d12c3bd19c5c7d4d42e66ce53b9..c1ab0ede07432f1c0c7f21be9e823ee9e9b8a75b 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/deps_updater.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/deps_updater.py
@@ -51,7 +51,7 @@ class DepsUpdater(object):
if options.target == 'wpt':
import_commitish = self.update(WPT_DEST_NAME, WPT_REPO_URL, options.keep_w3c_repos_around)
- self._copy_resources_to_wpt()
+ self._copy_resources()
elif options.target == 'css':
import_commitish = self.update(CSS_DEST_NAME, CSS_REPO_URL, options.keep_w3c_repos_around)
else:
@@ -102,22 +102,42 @@ class DepsUpdater(object):
return True
- def _copy_resources_to_wpt(self):
- """Copies some files over to a newly-updated wpt directory.
+ def _copy_resources(self):
+ """Copies resources from LayoutTests/resources to wpt and vice versa.
- There are some resources in our repository that we use instead of the
- upstream versions.
+ There are resources from our repository that we use instead of the
+ upstream versions. Conversely, there are also some resources that
+ are copied in the other direction.
+
+ Specifically:
+ - testharnessreport.js contains code needed to integrate our testing
+ with testharness.js; we also want our code to be used for tests
+ in wpt.
+ - TODO(qyearsley, jsbell): Document why other other files are copied,
+ or stop copying them if it's unnecessary.
+
+ If this method is changed, the lists of files expected to be identical
+ in LayoutTests/PRESUBMIT.py should also be changed.
"""
- resources_to_copy = [
+ resources_to_copy_to_wpt = [
('testharnessreport.js', 'resources'),
('WebIDLParser.js', 'resources'),
('vendor-prefix.js', 'common'),
]
- for filename, wpt_subdir in resources_to_copy:
+ resources_to_copy_from_wpt = [
+ ('idlharness.js', 'resources'),
+ ('testharness.js', 'resources'),
+ ]
+ for filename, wpt_subdir in resources_to_copy_to_wpt:
source = self.path_from_webkit_base('LayoutTests', 'resources', filename)
destination = self.path_from_webkit_base('LayoutTests', 'imported', WPT_DEST_NAME, wpt_subdir, filename)
self.copyfile(source, destination)
self.run(['git', 'add', destination])
+ for filename, wpt_subdir in resources_to_copy_from_wpt:
+ source = self.path_from_webkit_base('LayoutTests', 'imported', WPT_DEST_NAME, wpt_subdir, filename)
+ destination = self.path_from_webkit_base('LayoutTests', 'resources', filename)
+ self.copyfile(source, destination)
+ self.run(['git', 'add', destination])
def update(self, dest_dir_name, url, keep_w3c_repos_around):
"""Updates an imported repository.
« no previous file with comments | « third_party/WebKit/LayoutTests/PRESUBMIT.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698