mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +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:
committed by
Andreas Kling
parent
8673dd4e6e
commit
f2407cd511
@@ -222,11 +222,18 @@ def main():
|
||||
raise RuntimeError('Failed to file reference path in ref test')
|
||||
|
||||
if raw_reference_path is not None:
|
||||
reference_path = Path(resource_path).parent.joinpath(raw_reference_path).__str__()
|
||||
main_paths.append(PathMapping(
|
||||
wpt_base_url + '/' + reference_path,
|
||||
Path(test_type.expected_path + '/' + reference_path).absolute()
|
||||
))
|
||||
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,
|
||||
Path(test_type.expected_path + '/' + reference_path).absolute()
|
||||
))
|
||||
|
||||
files_to_modify = download_files(main_paths)
|
||||
create_expectation_files(main_paths)
|
||||
|
||||
Reference in New Issue
Block a user