From d2ee34690f4ee27c16173040a5ecba8c10e0bbcc Mon Sep 17 00:00:00 2001 From: Aliaksandr Kalenik Date: Tue, 5 Nov 2024 14:14:08 +0100 Subject: [PATCH] Meta+Tests: Substitute Ahem font path in import-wpt-test.py (cherry picked from commit 3833049fc8680d4e6349511cf566f27a25225ada) --- Meta/import-wpt-test.py | 2 ++ .../LibWeb/Text/input/wpt-import/fonts/Ahem.ttf | Bin 0 -> 21768 bytes .../LibWeb/Text/input/wpt-import/fonts/ahem.css | 6 ++++++ 3 files changed, 8 insertions(+) create mode 100644 Tests/LibWeb/Text/input/wpt-import/fonts/Ahem.ttf create mode 100644 Tests/LibWeb/Text/input/wpt-import/fonts/ahem.css 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 0000000000000000000000000000000000000000..4d4785a4123287a5ca08439a6230514de91df0e7 GIT binary patch literal 21768 zcmeHP34B!5x&Q9Hv(E$)2oWgiP1sSA$uAR;ddQD$G{2i4U#&F|+BQ;F=z6r58-n$rwZk{|Lw+yO@CRejcvIB_7Y-zv zay^lB6-m-IVJX?scb#}6dfcL=!UoC{B$Sd3h5WaOXjLl76VwcT&d)EE=^T=eDUz&! zcS)vAO6pN3k%AKBKpkI3fl7SS@ynV@C!6g{=wmc8P8v-^=t{bu9-v>-Z|EWVEv=xH z^e{a_kJ4lGIQCd!}KB2$R ze)^35N(bq0bcjBu!*qncpuf|X^c8(gN2#5Tks{;@(}elLt>Q-U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B@(Qvk}dzpz-9HUKf%}>O%E$O|+p&t_($@4YhH(DJnOiBGz0P z30KM0(fVMxAzPlMUZ>g8(vsbhU&UnflIqYrl&Ew| zr%lUYHO6y-=#f);-sIU6E5>_Fq!{dowHWawEds$amHjj=hQ$6X`-+LDex9|-V}=~v zn20%T#V4)!q}iUV_+(d~#fals@kuK_X~ie4_@ot|)MD#eJkp9!Cf`VQqKmC9P(5ZA9osM-X6Vcy+G>8V{*21BP zybq@lh`pbQw^P}Or}D{+JoU{uzftE?D5LNW`7An{en>x}F?0@i<)^GN^_}H-oJpQY zKc@enNjT+Ip~hmT&{V{0rz4_2lg_7Eh|OL=7t(*yMf4N8m@Yx=wh|Fw_PA=G0gm#| z!JC2zqPhIuB8C%CeDbRax|xS)@qC%&B@7e>;T-r7VW=?7RxxAJBp2@IjMe28 zj2_`Tco%ny;q?dRnNb0X-e1rzLtimeYK{-|r6A zgu{W{K%l_MP`*ExYYN8s{aRXFs^?Vqq65sqG7ka#aca`6X)mKuMm;Ir6GxMdQX6(*FSU CyAAgM literal 0 HcmV?d00001 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'); +} +