mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-21 15:10:19 +00:00
Meta: Support importing WPT ref tests that use an absolute path
For example, a few ref tests have a match like this: ``` <link rel="match" href="/css/reference/ref-filled-green-100px-square-only.html"> ``` Previously we'd interpret this as `http://css/reference/...` which made the test runner sad.
This commit is contained in:
parent
8673dd4e6e
commit
f2407cd511
Notes:
github-actions[bot]
2024-11-06 19:04:42 +00:00
Author: https://github.com/AtkinsSJ Commit: https://github.com/LadybirdBrowser/ladybird/commit/f2407cd5110 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2198
1 changed files with 12 additions and 5 deletions
|
@ -222,6 +222,13 @@ def main():
|
|||
raise RuntimeError('Failed to file reference path in ref test')
|
||||
|
||||
if raw_reference_path is not None:
|
||||
if raw_reference_path.startswith('/'):
|
||||
reference_path = raw_reference_path
|
||||
main_paths.append(PathMapping(
|
||||
wpt_base_url + raw_reference_path,
|
||||
Path(test_type.expected_path + raw_reference_path).absolute()
|
||||
))
|
||||
else:
|
||||
reference_path = Path(resource_path).parent.joinpath(raw_reference_path).__str__()
|
||||
main_paths.append(PathMapping(
|
||||
wpt_base_url + '/' + reference_path,
|
||||
|
|
Loading…
Reference in a new issue