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

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer.py

Issue 2020943002: update-w3c-deps: Do not modify testharness tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/imported/wpt/webrtc/simplecall.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. 1 # Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved.
2 # 2 #
3 # Redistribution and use in source and binary forms, with or without 3 # Redistribution and use in source and binary forms, with or without
4 # modification, are permitted provided that the following conditions 4 # modification, are permitted provided that the following conditions
5 # are met: 5 # are met:
6 # 6 #
7 # 1. Redistributions of source code must retain the above 7 # 1. Redistributions of source code must retain the above
8 # copyright notice, this list of conditions and the following 8 # copyright notice, this list of conditions and the following
9 # disclaimer. 9 # disclaimer.
10 # 2. Redistributions in binary form must reproduce the above 10 # 2. Redistributions in binary form must reproduce the above
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 269
270 reftests += 1 270 reftests += 1
271 total_tests += 1 271 total_tests += 1
272 copy_list.append({'src': test_info['reference'], 'dest': ref _file, 272 copy_list.append({'src': test_info['reference'], 'dest': ref _file,
273 'reference_support_info': test_info['refer ence_support_info']}) 273 'reference_support_info': test_info['refer ence_support_info']})
274 copy_list.append({'src': test_info['test'], 'dest': filename }) 274 copy_list.append({'src': test_info['test'], 'dest': filename })
275 275
276 elif 'jstest' in test_info.keys(): 276 elif 'jstest' in test_info.keys():
277 jstests += 1 277 jstests += 1
278 total_tests += 1 278 total_tests += 1
279 copy_list.append({'src': fullpath, 'dest': filename}) 279 copy_list.append({'src': fullpath, 'dest': filename, 'is_jst est': True})
280 else: 280 else:
281 total_tests += 1 281 total_tests += 1
282 copy_list.append({'src': fullpath, 'dest': filename}) 282 copy_list.append({'src': fullpath, 'dest': filename})
283 283
284 if copy_list: 284 if copy_list:
285 # Only add this directory to the list if there's something to im port 285 # Only add this directory to the list if there's something to im port
286 self.import_list.append({'dirname': root, 'copy_list': copy_list , 286 self.import_list.append({'dirname': root, 'copy_list': copy_list ,
287 'reftests': reftests, 'jstests': jstest s, 'total_tests': total_tests}) 287 'reftests': reftests, 'jstests': jstest s, 'total_tests': total_tests})
288 288
289 def find_paths_to_skip(self): 289 def find_paths_to_skip(self):
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 _log.info(' skipping %s' % relpath) 358 _log.info(' skipping %s' % relpath)
359 else: 359 else:
360 # FIXME: Maybe doing a file diff is in order here for existi ng files? 360 # FIXME: Maybe doing a file diff is in order here for existi ng files?
361 # In other words, there's no sense in overwriting identical files, but 361 # In other words, there's no sense in overwriting identical files, but
362 # there's no harm in copying the identical thing. 362 # there's no harm in copying the identical thing.
363 _log.info(' %s' % relpath) 363 _log.info(' %s' % relpath)
364 364
365 # Only html, xml, or css should be converted 365 # Only html, xml, or css should be converted
366 # FIXME: Eventually, so should js when support is added for this type of conversion 366 # FIXME: Eventually, so should js when support is added for this type of conversion
367 mimetype = mimetypes.guess_type(orig_filepath) 367 mimetype = mimetypes.guess_type(orig_filepath)
368 if 'html' in str(mimetype[0]) or 'xml' in str(mimetype[0]) or 'c ss' in str(mimetype[0]): 368 if 'is_jstest' not in file_to_copy and ('html' in str(mimetype[0 ]) or 'xml' in str(mimetype[0]) or 'css' in str(mimetype[0])):
369 converted_file = convert_for_webkit(new_path, filename=orig_ filepath, 369 converted_file = convert_for_webkit(new_path, filename=orig_ filepath,
370 reference_support_info=r eference_support_info) 370 reference_support_info=r eference_support_info)
371 371
372 if not converted_file: 372 if not converted_file:
373 if not self.import_in_place and not self.options.dry_run : 373 if not self.import_in_place and not self.options.dry_run :
374 self.filesystem.copyfile(orig_filepath, new_filepath ) # The file was unmodified. 374 self.filesystem.copyfile(orig_filepath, new_filepath ) # The file was unmodified.
375 else: 375 else:
376 for prefixed_property in converted_file[0]: 376 for prefixed_property in converted_file[0]:
377 total_prefixed_properties.setdefault(prefixed_proper ty, 0) 377 total_prefixed_properties.setdefault(prefixed_proper ty, 0)
378 total_prefixed_properties[prefixed_property] += 1 378 total_prefixed_properties[prefixed_property] += 1
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 """ Creates a destination directory that mirrors that of the source dire ctory """ 415 """ Creates a destination directory that mirrors that of the source dire ctory """
416 416
417 new_subpath = self.dir_to_import[len(self.top_of_repo):] 417 new_subpath = self.dir_to_import[len(self.top_of_repo):]
418 418
419 destination_directory = self.filesystem.join(self.destination_directory, new_subpath) 419 destination_directory = self.filesystem.join(self.destination_directory, new_subpath)
420 420
421 if not self.filesystem.exists(destination_directory): 421 if not self.filesystem.exists(destination_directory):
422 self.filesystem.maybe_make_directory(destination_directory) 422 self.filesystem.maybe_make_directory(destination_directory)
423 423
424 _log.info('Tests will be imported into: %s', destination_directory) 424 _log.info('Tests will be imported into: %s', destination_directory)
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/imported/wpt/webrtc/simplecall.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698