Update web-platform-tests to revision cfada7e6cb379699fa94c7ed8fcb97082327e10c

This commit is contained in:
WPT Sync Bot 2019-07-31 10:22:21 +00:00
parent 87e7e3d429
commit 06b00da16b
179 changed files with 6103 additions and 1186 deletions

View file

@ -48,6 +48,15 @@ def replace_end(s, old, new):
return s[:-len(old)] + new
def domains_are_distinct(a, b):
a_parts = a.split(".")
b_parts = b.split(".")
min_length = min(len(a_parts), len(b_parts))
slice_index = -1 * min_length
return a_parts[slice_index:] != b_parts[slice_index:]
class WrapperHandler(object):
__meta__ = abc.ABCMeta
@ -798,6 +807,14 @@ class ConfigBuilder(config.ConfigBuilder):
*args,
**kwargs
)
with self as c:
browser_host = c.get("browser_host")
alternate_host = c.get("alternate_hosts", {}).get("alt")
if not domains_are_distinct(browser_host, alternate_host):
raise ValueError(
"Alternate host must be distinct from browser host"
)
def _get_ws_doc_root(self, data):
if data["ws_doc_root"] is not None: