Update web-platform-tests to revision 9817f7f027fe1e92cc2fce31d6002c4d669918e8

This commit is contained in:
WPT Sync Bot 2018-03-08 20:11:36 -05:00 committed by Josh Matthews
parent 8e52f8a523
commit f3533538ea
2144 changed files with 21364 additions and 11001 deletions

View file

@ -17,7 +17,7 @@ import uuid
from collections import defaultdict, OrderedDict
from multiprocessing import Process, Event
from ..localpaths import repo_root
from localpaths import repo_root
import sslutils
from manifest.sourcefile import read_script_metadata, js_meta_re
@ -234,8 +234,10 @@ class RoutesBuilder(object):
def add_handler(self, method, route, handler):
self.extra.append((str(method), str(route), handler))
def add_static(self, path, format_args, content_type, route):
handler = handlers.StaticHandler(path, format_args, content_type)
def add_static(self, path, format_args, content_type, route, headers=None):
if headers is None:
headers = {}
handler = handlers.StaticHandler(path, format_args, content_type, **headers)
self.add_handler(b"GET", str(route), handler)
def add_mount_point(self, url_base, path):
@ -644,9 +646,10 @@ def get_ports(config, ssl_environment):
def normalise_config(config, ports):
host = config["external_host"] if config["external_host"] else config["host"]
host = config["host"]
domains = get_subdomains(host)
not_domains = get_not_subdomains(host)
ports_ = {}
for scheme, ports_used in ports.iteritems():
ports_[scheme] = ports_used
@ -666,7 +669,6 @@ def normalise_config(config, ports):
# make a (shallow) copy of the config and update that, so that the
# normalized config can be used in place of the original one.
config_ = config.copy()
config_["host"] = host
config_["domains"] = domains
config_["not_domains"] = not_domains
config_["ports"] = ports_
@ -685,8 +687,9 @@ def get_ssl_config(config, ssl_environment):
"cert_path": cert_path,
"encrypt_after_connect": config["ssl"]["encrypt_after_connect"]}
def start(config, ssl_environment, routes, **kwargs):
host = config["host"]
host = config.get("host_ip") or config["host"]
ports = get_ports(config, ssl_environment)
paths = get_paths(config)
bind_hostname = config["bind_hostname"]