| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 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 """Pull latest revisions of a W3C test repo and make a local commit.""" | 5 """Pull latest revisions of a W3C test repo and make a local commit.""" |
| 6 | 6 |
| 7 import argparse | 7 import argparse |
| 8 import re | 8 import re |
| 9 | 9 |
| 10 from webkitpy.common.webkit_finder import WebKitFinder | 10 from webkitpy.common.webkit_finder import WebKitFinder |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 self.print_(commit_msg) | 165 self.print_(commit_msg) |
| 166 self.print_('EOF') | 166 self.print_('EOF') |
| 167 self.fs.write_text_file(path_to_commit_msg, commit_msg) | 167 self.fs.write_text_file(path_to_commit_msg, commit_msg) |
| 168 self.run(['git', 'commit', '-a', '-F', path_to_commit_msg]) | 168 self.run(['git', 'commit', '-a', '-F', path_to_commit_msg]) |
| 169 self.remove(path_to_commit_msg) | 169 self.remove(path_to_commit_msg) |
| 170 self.print_('## Done: changes imported and committed.') | 170 self.print_('## Done: changes imported and committed.') |
| 171 else: | 171 else: |
| 172 self.print_('## Done: no changes to import.') | 172 self.print_('## Done: no changes to import.') |
| 173 | 173 |
| 174 def is_manual_test(self, fs, dirname, basename): | 174 def is_manual_test(self, fs, dirname, basename): |
| 175 return basename.endswith('-manual.html') or basename.endswith('-manual.h
tm') | 175 # We are importing manual pointer event tests and we are automating them
. |
| 176 return ("pointerevents" not in dirname) and (basename.endswith('-manual.
html') or basename.endswith('-manual.htm')) |
| 176 | 177 |
| 177 def is_baseline(self, fs, dirname, basename): | 178 def is_baseline(self, fs, dirname, basename): |
| 178 return basename.endswith('-expected.txt') | 179 return basename.endswith('-expected.txt') |
| 179 | 180 |
| 180 def is_not_baseline(self, fs, dirname, basename): | 181 def is_not_baseline(self, fs, dirname, basename): |
| 181 return not self.is_baseline(fs, dirname, basename) | 182 return not self.is_baseline(fs, dirname, basename) |
| 182 | 183 |
| 183 def run(self, cmd, exit_on_failure=True, cwd=None): | 184 def run(self, cmd, exit_on_failure=True, cwd=None): |
| 184 if self.verbose: | 185 if self.verbose: |
| 185 self.print_(' '.join(cmd)) | 186 self.print_(' '.join(cmd)) |
| (...skipping 28 matching lines...) Expand all Loading... |
| 214 dest = self.path_from_webkit_base(*comps) | 215 dest = self.path_from_webkit_base(*comps) |
| 215 if self.verbose: | 216 if self.verbose: |
| 216 self.print_('rm -fr %s' % dest) | 217 self.print_('rm -fr %s' % dest) |
| 217 self.fs.rmtree(dest) | 218 self.fs.rmtree(dest) |
| 218 | 219 |
| 219 def path_from_webkit_base(self, *comps): | 220 def path_from_webkit_base(self, *comps): |
| 220 return self.finder.path_from_webkit_base(*comps) | 221 return self.finder.path_from_webkit_base(*comps) |
| 221 | 222 |
| 222 def print_(self, msg): | 223 def print_(self, msg): |
| 223 self.host.print_(msg) | 224 self.host.print_(msg) |
| OLD | NEW |