Commit c3ce84e0 authored by Matt Menke's avatar Matt Menke Committed by Commit Bot

Add *.weba audio/webm MIME mapping.

Windows 10 now maps audio/webm to *.weba by default. This CL fixes a
test that change broken (MimeUtilTest.GetPreferredExtensionForMimeType),
and adds a secondary mapping for audio/webm to weba.

Bug: 923502
Change-Id: Ia2e3344c5bf270a6bcfe5154ce8a4e28285821fc
Reviewed-on: https://chromium-review.googlesource.com/c/1436939Reviewed-by: default avatarAsanka Herath <asanka@chromium.org>
Commit-Queue: Matt Menke <mmenke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#626104}
parent 7a7b211a
...@@ -196,6 +196,8 @@ static const MimeInfo kSecondaryMappings[] = { ...@@ -196,6 +196,8 @@ static const MimeInfo kSecondaryMappings[] = {
{"application/x-tar", "tar"}, {"application/x-tar", "tar"},
{"application/zip", "zip"}, {"application/zip", "zip"},
{"audio/mpeg", "mp3"}, {"audio/mpeg", "mp3"},
// This is the platform mapping on recent versions of Windows 10.
{"audio/webm", "weba"},
{"image/bmp", "bmp"}, {"image/bmp", "bmp"},
{"image/jpeg", "jfif,pjpeg,pjp"}, {"image/jpeg", "jfif,pjpeg,pjp"},
{"image/svg+xml", "svg,svgz"}, {"image/svg+xml", "svg,svgz"},
......
...@@ -32,6 +32,7 @@ TEST(MimeUtilTest, ExtensionTest) { ...@@ -32,6 +32,7 @@ TEST(MimeUtilTest, ExtensionTest) {
{FILE_PATH_LITERAL("json"), "application/json", true}, {FILE_PATH_LITERAL("json"), "application/json", true},
{FILE_PATH_LITERAL("js"), "text/javascript", true}, {FILE_PATH_LITERAL("js"), "text/javascript", true},
{FILE_PATH_LITERAL("webm"), "video/webm", true}, {FILE_PATH_LITERAL("webm"), "video/webm", true},
{FILE_PATH_LITERAL("weba"), "audio/webm", true},
#if defined(OS_CHROMEOS) #if defined(OS_CHROMEOS)
// These are test cases for testing platform mime types on Chrome OS. // These are test cases for testing platform mime types on Chrome OS.
{FILE_PATH_LITERAL("epub"), "application/epub+zip", true}, {FILE_PATH_LITERAL("epub"), "application/epub+zip", true},
...@@ -70,7 +71,6 @@ TEST(MimeUtilTest, GetPreferredExtensionForMimeType) { ...@@ -70,7 +71,6 @@ TEST(MimeUtilTest, GetPreferredExtensionForMimeType) {
{"application/wasm", FILE_PATH_LITERAL("wasm")}, // Primary {"application/wasm", FILE_PATH_LITERAL("wasm")}, // Primary
{"application/javascript", FILE_PATH_LITERAL("js")}, // Secondary {"application/javascript", FILE_PATH_LITERAL("js")}, // Secondary
{"text/javascript", FILE_PATH_LITERAL("js")}, // Primary {"text/javascript", FILE_PATH_LITERAL("js")}, // Primary
{"audio/webm", FILE_PATH_LITERAL("webm")}, // Primary
{"video/webm", FILE_PATH_LITERAL("webm")}, // Primary {"video/webm", FILE_PATH_LITERAL("webm")}, // Primary
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment