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 0d600f2cb4ac51f3c4cf9f99e7e8a7c80e56fbe8..64bc28701e68f24ced34d158839ce38496ac75df 100644 |
| --- a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/deps_updater.py |
| +++ b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/deps_updater.py |
| @@ -45,18 +45,7 @@ class DepsUpdater(object): |
| import_commitish = self.update( |
| WPT_DEST_NAME, |
| 'https://chromium.googlesource.com/external/w3c/web-platform-tests.git') |
| - |
| - for resource in ['testharnessreport.js', 'WebIDLParser.js']: |
| - source = self.path_from_webkit_base('LayoutTests', 'resources', resource) |
| - destination = self.path_from_webkit_base('LayoutTests', 'imported', WPT_DEST_NAME, 'resources', resource) |
| - self.copyfile(source, destination) |
| - self.run(['git', 'add', destination]) |
| - for resource in ['vendor-prefix.js']: |
| - source = self.path_from_webkit_base('LayoutTests', 'resources', resource) |
| - destination = self.path_from_webkit_base('LayoutTests', 'imported', WPT_DEST_NAME, 'common', resource) |
| - self.copyfile(source, destination) |
| - self.run(['git', 'add', destination]) |
| - |
| + self._copy_resources_to_wpt() |
| elif self.target == 'css': |
| import_commitish = self.update( |
| CSS_DEST_NAME, |
| @@ -132,6 +121,23 @@ class DepsUpdater(object): |
| return True |
| + def _copy_resources_to_wpt(self): |
| + """Copies some files over to a newly-updated wpt directory. |
| + |
| + This is necessary because we want to be used when running imported tests |
|
Dirk Pranke
2016/08/15 23:40:14
Nit: what is it that we want to be used? This word
|
| + which are different than those in the upstream repo. |
| + """ |
| + resources_to_copy = [ |
| + ('testharnessreport.js', 'resources'), |
| + ('WebIDLParser.js', 'resources'), |
| + ('vendor-prefix.js', 'common'), |
| + ] |
| + for filename, wpt_subdir in resources_to_copy: |
| + 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]) |
| + |
| def update(self, dest_dir_name, url): |
| """Updates an imported repository. |