Use data_url::Mime to parse the MIME Types

This commit follows the spectification
https://fetch.spec.whatwg.org/#concept-header-extract-mime-type
This commit is contained in:
Vincent Ricard 2020-10-29 18:03:22 +01:00
parent 15a435a7ae
commit 43b3d93aec
10 changed files with 147 additions and 60 deletions

View file

@ -96,9 +96,6 @@
[Request: combined response Content-Type: text/plain;charset=gbk text/plain]
expected: NOTRUN
[fetch(): separate response Content-Type: text/plain]
expected: FAIL
[fetch(): combined response Content-Type: text/html;" \\" text/plain ";charset=GBK]
expected: NOTRUN
@ -312,21 +309,6 @@
[fetch(): separate response Content-Type: text/plain ]
expected: NOTRUN
[<iframe>: separate response Content-Type: text/plain */*;charset=gbk]
expected: FAIL
[<iframe>: separate response Content-Type: text/html */*]
expected: FAIL
[<iframe>: separate response Content-Type: text/html;x=" text/plain]
expected: FAIL
[<iframe>: combined response Content-Type: text/html;" \\" text/plain]
expected: FAIL
[<iframe>: separate response Content-Type: text/html;" \\" text/plain]
expected: FAIL
[<iframe>: combined response Content-Type: text/html;x=" text/plain]
expected: FAIL

View file

@ -1,4 +1,16 @@
[contenttype.any.worker.html]
[Response with Content-Type "application/wasm;": compileStreaming]
expected: FAIL
[Response with Content-Type "application/wasm;": instantiateStreaming]
expected: FAIL
[Response with Content-Type "application/wasm;x": compileStreaming]
expected: FAIL
[Response with Content-Type "application/wasm;x": instantiateStreaming]
expected: FAIL
[contenttype.any.sharedworker.html]
expected: ERROR
@ -7,6 +19,18 @@
[contenttype.any.html]
[Response with Content-Type "application/wasm;": compileStreaming]
expected: FAIL
[Response with Content-Type "application/wasm;": instantiateStreaming]
expected: FAIL
[Response with Content-Type "application/wasm;x": compileStreaming]
expected: FAIL
[Response with Content-Type "application/wasm;x": instantiateStreaming]
expected: FAIL
[contenttype.any.serviceworker.html]
expected: ERROR

View file

@ -1,10 +1,5 @@
[overridemimetype-blob.html]
type: testharness
[Use text/xml as fallback MIME type]
expected: FAIL
[Use text/xml as fallback MIME type, 2]
expected: FAIL
[Bogus MIME type should end up as application/octet-stream]
expected: FAIL

View file

@ -1,5 +0,0 @@
[responsexml-basic.htm]
type: testharness
[responseXML on empty response documents]
expected: FAIL

View file

@ -1,4 +0,0 @@
[responsexml-media-type.htm]
[XMLHttpRequest: responseXML MIME type tests ('text/plain;+xml', should not parse)]
expected: FAIL

View file

@ -1,8 +1,5 @@
[responsexml-non-well-formed.htm]
type: testharness
[XMLHttpRequest: responseXML non well-formed tests]
expected: FAIL
[XMLHttpRequest: responseXML non well-formed tests 1]
expected: FAIL