Chromium Code Reviews| 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..d5b17ccec752a1dd972eaa1c8ca734488e1c9c34 100644 |
| --- a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/deps_updater.py |
| +++ b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/deps_updater.py |
| @@ -102,23 +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 some common resources that have copies in web-platform-tests, |
| + and for some we always want to use the upstream versions, but for others |
| + we always want to use our version, so these are copied after import to |
|
jsbell
2016/09/01 17:55:55
nit: run-on sentence; can you split it up?
qyearsley
2016/09/01 18:16:24
Done; also I think the comments below are redundan
|
| + ensure consistency. |
| + |
| + If this method is changed, the lists of files expected to be identical |
| + in LayoutTests/PRESUBMIT.py should also be cahnged. |
|
jsbell
2016/09/01 17:55:55
typo: "cahnged" -> "changed"
qyearsley
2016/09/01 18:16:24
Done
|
| """ |
| - resources_to_copy = [ |
| + # There are some resources in our repository that we use instead of the |
| + # upstream versions. |
|
jsbell
2016/09/01 17:55:55
Can drop "There are some"
But maybe document why
qyearsley
2016/09/01 18:16:24
I'm actually not sure except for testharnessreport
|
| + resources_to_copy_to_wpt = [ |
| ('testharnessreport.js', 'resources'), |
| ('WebIDLParser.js', 'resources'), |
|
jsbell
2016/09/01 17:55:55
Why do we want our WebIDLParser.js instead of wpt'
qyearsley
2016/09/01 18:16:25
Not sure; added a TODO.
|
| ('vendor-prefix.js', 'common'), |
| ] |
| - for filename, wpt_subdir in resources_to_copy: |
| + 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]) |
| + # There are also some resources from the upstream repository that |
|
jsbell
2016/09/01 17:55:55
Maybe move this list up near the other one near th
qyearsley
2016/09/01 18:16:25
Done
|
| + # we copy over to LayoutTests/resources which we may want to update. |
| + resources_to_copy_from_wpt = [ |
|
jsbell
2016/09/01 17:55:55
As above, can we document why we want wpt's versio
qyearsley
2016/09/01 18:16:24
Again, not completely sure :-/
|
| + ('idlharness.js', 'resources'), |
| + ('testharness.js', 'resources'), |
| + ] |
| + 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. |