Update web-platform-tests to revision c2e5b9fbaa17424f05ca2bb04609790a3b61d5c2

This commit is contained in:
WPT Sync Bot 2019-03-17 21:51:47 -04:00 committed by Josh Matthews
parent db7bb2a510
commit f2c1b70e4a
138 changed files with 2799 additions and 851 deletions

View file

@ -162,6 +162,21 @@ class TypeData(object):
self.tests_root = tests_root
self.json_data = data
def to_json(self):
data = {
from_os_path(path):
[t for t in sorted(test.to_json() for test in tests)]
for path, tests in iteritems(self.data)
}
if self.json_data is not None:
if not data:
# avoid copying if there's nothing here yet
return self.json_data
data.update(self.json_data)
return data
def paths(self):
"""Get a list of all paths containing items of this type,
without actually constructing all the items"""
@ -363,11 +378,7 @@ class Manifest(object):
def to_json(self):
out_items = {
test_type: {
from_os_path(path):
[t for t in sorted(test.to_json() for test in tests)]
for path, tests in iteritems(type_paths)
}
test_type: type_paths.to_json()
for test_type, type_paths in iteritems(self._data) if type_paths
}
rv = {"url_base": self.url_base,