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

Unified Diff: Tools/Scripts/webkitpy/w3c/test_importer.py

Issue 15590004: track count of prefixed properties that are imported (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Tools/Scripts/webkitpy/w3c/test_importer.py
diff --git a/Tools/Scripts/webkitpy/w3c/test_importer.py b/Tools/Scripts/webkitpy/w3c/test_importer.py
index 0dbd823818209a6fc618a66a2ce58804b9db50b9..a02fb7bf9f27f9a9edbbf761b30776dc93aa4d46 100644
--- a/Tools/Scripts/webkitpy/w3c/test_importer.py
+++ b/Tools/Scripts/webkitpy/w3c/test_importer.py
@@ -265,6 +265,7 @@ class TestImporter(object):
total_imported_tests = 0
total_imported_reftests = 0
total_imported_jstests = 0
+ total_prefixed_properties = {}
for dir_to_copy in self.import_list:
@@ -322,12 +323,15 @@ class TestImporter(object):
# FIXME: Eventually, so should js when support is added for this type of conversion
mimetype = mimetypes.guess_type(orig_filepath)
if 'html' in str(mimetype[0]) or 'xml' in str(mimetype[0]) or 'css' in str(mimetype[0]):
-
converted_file = converter.convert_for_webkit(new_path, filename=orig_filepath)
if not converted_file:
shutil.copyfile(orig_filepath, new_filepath) # The file was unmodified.
else:
+ for prefixed_property in converted_file[0]:
+ total_prefixed_properties.setdefault(prefixed_property, 0)
+ total_prefixed_properties[prefixed_property] += 1
+
prefixed_properties.extend(set(converted_file[0]) - set(prefixed_properties))
outfile = open(new_filepath, 'wb')
outfile.write(converted_file[1])
@@ -346,6 +350,10 @@ class TestImporter(object):
print 'Imported ' + str(total_imported_reftests) + ' reftests'
print 'Imported ' + str(total_imported_jstests) + ' JS tests'
print 'Imported ' + str(total_imported_tests - total_imported_jstests - total_imported_reftests) + ' pixel/manual tests'
+ print
+ print "Properties needing prefixes (by count):"
+ for prefixed_property in sorted(total_prefixed_properties, key=lambda p: total_prefixed_properties[p]):
+ print " %s: %s" % (prefixed_property, total_prefixed_properties[prefixed_property])
def setup_destination_directory(self):
""" Creates a destination directory that mirrors that of the source approved or submitted directory """
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698