mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Update web-platform-tests to revision cfada7e6cb379699fa94c7ed8fcb97082327e10c
This commit is contained in:
parent
87e7e3d429
commit
06b00da16b
179 changed files with 6103 additions and 1186 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue