mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 986930 - QuickTime plugin shows garbled text for mime type descriptions in about:plugins and about:addons. r=bsmedberg
This commit is contained in:
parent
c2bca27389
commit
e780a2bae6
@ -419,7 +419,7 @@ nsPluginTag::GetMimeTypes(uint32_t* aCount, char16_t*** aResults)
|
||||
*aCount = count;
|
||||
|
||||
for (uint32_t i = 0; i < count; i++) {
|
||||
(*aResults)[i] = ToNewUnicode(mMimeTypes[i]);
|
||||
(*aResults)[i] = ToNewUnicode(NS_ConvertUTF8toUTF16(mMimeTypes[i]));
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
@ -436,7 +436,7 @@ nsPluginTag::GetMimeDescriptions(uint32_t* aCount, char16_t*** aResults)
|
||||
*aCount = count;
|
||||
|
||||
for (uint32_t i = 0; i < count; i++) {
|
||||
(*aResults)[i] = ToNewUnicode(mMimeDescriptions[i]);
|
||||
(*aResults)[i] = ToNewUnicode(NS_ConvertUTF8toUTF16(mMimeDescriptions[i]));
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
@ -453,7 +453,7 @@ nsPluginTag::GetExtensions(uint32_t* aCount, char16_t*** aResults)
|
||||
*aCount = count;
|
||||
|
||||
for (uint32_t i = 0; i < count; i++) {
|
||||
(*aResults)[i] = ToNewUnicode(mExtensions[i]);
|
||||
(*aResults)[i] = ToNewUnicode(NS_ConvertUTF8toUTF16(mExtensions[i]));
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
|
@ -39,6 +39,7 @@ support-files =
|
||||
[test_bug863792.html]
|
||||
[test_bug967694.html]
|
||||
[test_bug985859.html]
|
||||
[test_bug986930.html]
|
||||
[test_cocoa_focus.html]
|
||||
skip-if = toolkit != "cocoa"
|
||||
support-files = cocoa_focus.html
|
||||
|
20
dom/plugins/test/mochitest/test_bug986930.html
Normal file
20
dom/plugins/test/mochitest/test_bug986930.html
Normal file
@ -0,0 +1,20 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8"/>
|
||||
<title>Test for Bug 986930</title>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
<script type="application/javascript" src="utils.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script class="testbody" type="application/javascript">
|
||||
var testPlugin = getTestPlugin("Test Plug-in");
|
||||
|
||||
var mimeDescriptions = testPlugin.getMimeDescriptions({});
|
||||
|
||||
is(mimeDescriptions[0], "Test \u2122 mimetype",
|
||||
"Plugin should handle non-ascii mime description");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -31,7 +31,7 @@
|
||||
<string>tst</string>
|
||||
</array>
|
||||
<key>WebPluginTypeDescription</key>
|
||||
<string>Test mimetype</string>
|
||||
<string>Test ™ mimetype</string>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
|
@ -26,7 +26,7 @@ BEGIN
|
||||
VALUE "CompanyName", "mozilla.org"
|
||||
VALUE "FileDescription", L"Plug-in for testing purposes.\x2122 (\x0939\x093f\x0928\x094d\x0926\x0940 \x4e2d\x6587 \x0627\x0644\x0639\x0631\x0628\x064a\x0629)"
|
||||
VALUE "FileExtents", "tst"
|
||||
VALUE "FileOpenName", "Test mimetype"
|
||||
VALUE "FileOpenName", L"Test \x2122 mimetype"
|
||||
VALUE "FileVersion", "1.0"
|
||||
VALUE "InternalName", "nptest"
|
||||
VALUE "MIMEType", "application/x-test"
|
||||
|
@ -3,4 +3,4 @@ const char *sPluginDescription = "Plug-in for testing purposes.\xE2\x84\xA2 " \
|
||||
"(\xe0\xa4\xb9\xe0\xa4\xbf\xe0\xa4\xa8\xe0\xa5\x8d\xe0\xa4\xa6\xe0\xa5\x80 " \
|
||||
"\xe4\xb8\xad\xe6\x96\x87 " \
|
||||
"\xd8\xa7\xd9\x84\xd8\xb9\xd8\xb1\xd8\xa8\xd9\x8a\xd8\xa9)";
|
||||
const char *sMimeDescription = "application/x-test:tst:Test mimetype";
|
||||
const char *sMimeDescription = "application/x-test:tst:Test \xE2\x84\xA2 mimetype";
|
||||
|
Loading…
Reference in New Issue
Block a user