Update web-platform-tests to revision b382ac7192087da0a7439902e20be76ab7587ee8

This commit is contained in:
WPT Sync Bot 2018-08-10 21:31:07 -04:00
parent 3e96a322ae
commit defee2aae0
45 changed files with 645 additions and 189 deletions

View file

@ -1,4 +1,4 @@
from six.moves.urllib.parse import urljoin
from six.moves.urllib.parse import urljoin, urlparse
from abc import ABCMeta, abstractproperty
@ -46,6 +46,10 @@ class ManifestItem(object):
"""The test's id (usually its url)"""
pass
@property
def meta_flags(self):
return set(self.source_file.meta_flags)
@property
def path(self):
"""The test path relative to the test_root"""
@ -53,7 +57,8 @@ class ManifestItem(object):
@property
def https(self):
return "https" in self.source_file.meta_flags
flags = self.meta_flags
return ("https" in flags or "serviceworker" in flags)
def key(self):
"""A unique identifier for the test"""
@ -95,6 +100,10 @@ class URLManifestItem(ManifestItem):
def id(self):
return self.url
@property
def meta_flags(self):
return set(urlparse(self.url).path.rsplit("/", 1)[1].split(".")[1:-1])
@property
def url(self):
return urljoin(self.url_base, self._url)