diff --git a/Meta/import-wpt-test.py b/Meta/import-wpt-test.py index 56d504402babce..95e6178daeab9f 100755 --- a/Meta/import-wpt-test.py +++ b/Meta/import-wpt-test.py @@ -66,6 +66,8 @@ def modify_sources(files): with open(file, 'r') as f: page_source = f.read() + page_source = page_source.replace('/fonts/ahem.css', '../' * parent_folder_count + 'fonts/ahem.css') + # Iterate all scripts and overwrite the src attribute for i, src_value in enumerate(src_values): if src_value.startswith('/'): diff --git a/Tests/LibWeb/Text/input/wpt-import/fonts/Ahem.ttf b/Tests/LibWeb/Text/input/wpt-import/fonts/Ahem.ttf new file mode 100644 index 00000000000000..4d4785a4123287 Binary files /dev/null and b/Tests/LibWeb/Text/input/wpt-import/fonts/Ahem.ttf differ diff --git a/Tests/LibWeb/Text/input/wpt-import/fonts/ahem.css b/Tests/LibWeb/Text/input/wpt-import/fonts/ahem.css new file mode 100644 index 00000000000000..7a195a2a89cf6f --- /dev/null +++ b/Tests/LibWeb/Text/input/wpt-import/fonts/ahem.css @@ -0,0 +1,6 @@ +@font-face { + font-family: 'Ahem'; + src: local('Ahem'), + url('Ahem.ttf'); +} +