Update web-platform-tests to revision e8bfc205e36ad699601212cd50083870bad9a75d

This commit is contained in:
Ms2ger 2016-11-14 11:07:09 +01:00
parent 65dd6d4340
commit ccdb0a3458
1428 changed files with 118036 additions and 9786 deletions

View file

@ -1,7 +1,8 @@
import os
from six import BytesIO
blacklist = ["/", "/tools/", "/resources/", "/common/", "/conformance-checkers/", "_certs"]
blacklist = ["/tools/", "/resources/", "/common/", "/conformance-checkers/", "/_certs/"]
blacklist_in = ["/resources/", "/support/"]
def rel_path_to_url(rel_path, url_base="/"):
assert not os.path.isabs(rel_path)
@ -12,11 +13,13 @@ def rel_path_to_url(rel_path, url_base="/"):
return url_base + rel_path.replace(os.sep, "/")
def is_blacklisted(url):
if "/" not in url[1:]:
return True
for item in blacklist:
if item == "/":
if "/" not in url[1:]:
return True
elif url.startswith(item):
if url.startswith(item):
return True
for item in blacklist_in:
if item in url:
return True
return False