mirror of
https://github.com/servo/servo.git
synced 2025-08-25 23:28:21 +01:00
Ignore the Content-Type header completely for @font-face.
This matches the previous default (network.mime.sniff off) behaviour in all but one case: we will now accept a font without a `Content-Type` header, which would previously have been ignored.
This commit is contained in:
parent
cff0f01c70
commit
44c80d5b18
7 changed files with 3 additions and 43 deletions
|
@ -1,3 +1,2 @@
|
|||
[mime_sniffing_font_context.html]
|
||||
type: testharness
|
||||
prefs: [network.mime.sniff:true]
|
||||
|
|
|
@ -51,8 +51,8 @@ async_test(function() {
|
|||
var xhr = new XMLHttpRequest();
|
||||
xhr.open('GET', 'resources/no_mime_type.py?Content-Type=application/xhtml%2Bxml', true);
|
||||
xhr.onload = this.step_func_done(function() {
|
||||
t4.step_timeout(checkFontNotLoaded.bind(t4, 'fifth', 'sixth'), 500);
|
||||
assert_equals(xhr.getResponseHeader('Content-Type'), 'application/xhtml+xml');
|
||||
t4.step_timeout(checkFontLoaded, 500);
|
||||
});
|
||||
xhr.send();
|
||||
}, "XHR Content-Type has xhtml+xml");
|
||||
|
@ -61,8 +61,8 @@ async_test(function() {
|
|||
var xhr = new XMLHttpRequest();
|
||||
xhr.open('GET', 'resources/no_mime_type.py?Content-Type=application/xml', true);
|
||||
xhr.onload = this.step_func_done(function() {
|
||||
t3.step_timeout(checkFontNotLoaded.bind(t3, 'third', 'fourth'), 500);
|
||||
assert_equals(xhr.getResponseHeader('Content-Type'), 'application/xml');
|
||||
t3.step_timeout(checkFontLoaded, 500);
|
||||
});
|
||||
xhr.send();
|
||||
}, "XHR Content-Type has xml");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue