mirror of
https://github.com/servo/servo.git
synced 2025-08-08 06:55:31 +01:00
tests: Use Ahem font provided by WPT harness. (#37054)
#37021 exposed that our tests are trying to load a local file path for Ahem.ttf, but this stops working when we implement the specified CORS protections for our font requests. Luckily, the WPT suite already provides a same-origin version of the same font, so we can just update our CSS to use that font face instead. Testing: Existing WPT coverage. Signed-off-by: Josh Matthews <josh@joshmatthews.net>
This commit is contained in:
parent
4e9993128b
commit
27527adf35
14 changed files with 14 additions and 78 deletions
|
@ -28,4 +28,3 @@
|
|||
|
||||
[.test 16: space-around]
|
||||
expected: FAIL
|
||||
|
4
tests/wpt/mozilla/meta/MANIFEST.json
vendored
4
tests/wpt/mozilla/meta/MANIFEST.json
vendored
|
@ -8608,7 +8608,7 @@
|
|||
],
|
||||
"css": {
|
||||
"ahem.css": [
|
||||
"51eede74aaa0b43f2c9235019bc73a508b1f14e4",
|
||||
"a7db592e0df53e0b70f66ca7b31a7734db18887e",
|
||||
[]
|
||||
]
|
||||
},
|
||||
|
@ -10654,7 +10654,7 @@
|
|||
[]
|
||||
],
|
||||
"no_mime_type.py": [
|
||||
"860005a42c237735287031133786352d7c732402",
|
||||
"980eeee18f993f20a9df033f337a52ec93155ec4",
|
||||
[]
|
||||
],
|
||||
"origin_helpers.js": [
|
||||
|
|
6
tests/wpt/mozilla/tests/css/css/ahem.css
vendored
6
tests/wpt/mozilla/tests/css/css/ahem.css
vendored
|
@ -1,3 +1,9 @@
|
|||
@font-face {
|
||||
font-family: 'ahem';
|
||||
src: local('Ahem'),
|
||||
url('/fonts/Ahem.ttf');
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: 'ahem';
|
||||
font-size: 100px;
|
||||
|
|
|
@ -7,5 +7,5 @@ def main(request, response):
|
|||
headers = []
|
||||
if b'Content-Type' in request.GET:
|
||||
headers += [(b'Content-Type', request.GET[b'Content-Type'])]
|
||||
with open('./resources/ahem/AHEM____.TTF', 'rb') as f:
|
||||
with open('./tests/wpt/tests/fonts/Ahem.ttf', 'rb') as f:
|
||||
return 200, headers, f.read()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue