Backed out changeset 733ddb26d3b2 (bug 1719598) for causing xpc failures in test_getFromTypeAndExtension. CLOSED TREE

This commit is contained in:
Sandor Molnar 2021-07-21 02:08:16 +03:00
parent 9d2879a48a
commit 798b93a069
3 changed files with 1 additions and 19 deletions

View File

@ -2800,7 +2800,7 @@ NS_IMETHODIMP nsExternalHelperAppService::GetFromTypeAndExtension(
// XXXzpao This should probably be localized
nsAutoCString desc(aFileExt);
desc.AppendLiteral(" File");
(*_retval)->SetDescription(NS_ConvertUTF8toUTF16(desc));
(*_retval)->SetDescription(NS_ConvertASCIItoUTF16(desc));
LOG(("Falling back to 'File' file description\n"));
}

View File

@ -1,17 +0,0 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
add_task(async function test_utf8_extension() {
const mimeService = Cc["@mozilla.org/mime;1"].getService(Ci.nsIMIMEService);
let someMIME = mimeService.getFromTypeAndExtension(
"application/x-gobbledygook",
".тест"
);
Assert.stringContains(someMIME.description, "тест");
// primary extension isn't set on macOS, see bug 1721181
if (AppConstants.platform != "macosx") {
Assert.equal(someMIME.primaryExtension, ".тест");
}
});

View File

@ -7,7 +7,6 @@ firefox-appdir = browser
# No default stored handlers on android given lack of support.
# No default stored handlers on Thunderbird.
skip-if = os == "android" || appname == "thunderbird"
[test_getFromTypeAndExtension.js]
[test_getMIMEInfo_pdf.js]
[test_getMIMEInfo_unknown_mime_type.js]
run-if = os == "win" # Windows only test