diff --git a/Tests/LibWeb/TestMimeSniff.cpp b/Tests/LibWeb/TestMimeSniff.cpp index e28cb44c17..538a311f84 100644 --- a/Tests/LibWeb/TestMimeSniff.cpp +++ b/Tests/LibWeb/TestMimeSniff.cpp @@ -30,3 +30,62 @@ TEST_CASE(determine_computed_mime_type_given_no_sniff_is_unset) EXPECT_EQ(xml_mime_type, MUST(computed_mime_type.serialized())); } + +TEST_CASE(compute_unknown_mime_type) +{ + HashMap> mime_type_to_headers_map; + + mime_type_to_headers_map.set("application/octet-stream"sv, { "\x00"sv }); + mime_type_to_headers_map.set("text/html"sv, { + "\x09\x09"sv, + "\x20