Commit 842f46a9 authored by Joey Arhar's avatar Joey Arhar Committed by Commit Bot

Use audio/mpeg instead of audio/mp3 for .mp3 files

audio/mpeg is used instead of audio/mp3 in safari and firefox for .mp3
files, as defined in this rfc: https://tools.ietf.org/html/rfc3003

Bug: 227004
Change-Id: Ie3e244f5c2ea4550237c6856437dc4aa575bd7fa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1989133Reviewed-by: default avatarKent Tamura <tkent@chromium.org>
Reviewed-by: default avatarMatt Menke <mmenke@chromium.org>
Reviewed-by: default avatarMason Freed <masonfreed@chromium.org>
Commit-Queue: Joey Arhar <jarhar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#730910}
parent 810f1fc1
......@@ -148,6 +148,9 @@ static const MimeInfo kPrimaryMappings[] = {
// Must precede audio/webm .
{"video/webm", "webm"},
// Must precede audio/mp3
{"audio/mpeg", "mp3"},
{"application/wasm", "wasm"},
{"application/x-chrome-extension", "crx"},
{"application/xhtml+xml", "xhtml,xht,xhtm"},
......@@ -196,7 +199,6 @@ static const MimeInfo kSecondaryMappings[] = {
{"application/x-tar", "tar"},
{"application/x-x509-ca-cert", "cer,crt"},
{"application/zip", "zip"},
{"audio/mpeg", "mp3"},
// This is the platform mapping on recent versions of Windows 10.
{"audio/webm", "weba"},
{"image/bmp", "bmp"},
......
<!DOCTYPE html>
<head>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
</head>
<body>
<iframe id="formiframe" name="formiframe"></iframe>
<form target="formiframe" id="myform" action="/forms/resources/return-content-type.php" enctype="multipart/form-data" method="post">
<input type="text" name="textinput" value="hello world">
<input type="file" name="fileinput" id="fileinput">
<input type="submit">
</form>
<script>
window.test(() => {
if (!window.eventSender)
return;
const fileinput = document.getElementById('fileinput');
window.eventSender.beginDragWithFiles(['resources/sound_0.mp3']);
const centerx = fileinput.offsetLeft + fileinput.offsetWidth / 2;
const centery = fileinput.offsetTop + fileinput.offsetHeight / 2;
window.eventSender.mouseMoveTo(centerx, centery);
window.eventSender.mouseUp();
assert_equals(fileinput.files[0].type, 'audio/mpeg');
});
</script>
</body>
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