diff --git a/dom/plugins/base/nsPluginTags.cpp b/dom/plugins/base/nsPluginTags.cpp index e8c39857b54..71e549c1968 100644 --- a/dom/plugins/base/nsPluginTags.cpp +++ b/dom/plugins/base/nsPluginTags.cpp @@ -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; diff --git a/dom/plugins/test/mochitest/mochitest.ini b/dom/plugins/test/mochitest/mochitest.ini index c620694236f..a96f663cf20 100644 --- a/dom/plugins/test/mochitest/mochitest.ini +++ b/dom/plugins/test/mochitest/mochitest.ini @@ -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 diff --git a/dom/plugins/test/mochitest/test_bug986930.html b/dom/plugins/test/mochitest/test_bug986930.html new file mode 100644 index 00000000000..620f93913fc --- /dev/null +++ b/dom/plugins/test/mochitest/test_bug986930.html @@ -0,0 +1,20 @@ + + + + + Test for Bug 986930 + + + + + + + + diff --git a/dom/plugins/test/testplugin/Info.plist b/dom/plugins/test/testplugin/Info.plist index e592c2c2d1e..dc6aa5cec39 100644 --- a/dom/plugins/test/testplugin/Info.plist +++ b/dom/plugins/test/testplugin/Info.plist @@ -31,7 +31,7 @@ tst WebPluginTypeDescription - Test mimetype + Test ™ mimetype diff --git a/dom/plugins/test/testplugin/nptest.rc b/dom/plugins/test/testplugin/nptest.rc index a7676f83eb3..948fb846ef5 100644 --- a/dom/plugins/test/testplugin/nptest.rc +++ b/dom/plugins/test/testplugin/nptest.rc @@ -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" diff --git a/dom/plugins/test/testplugin/nptest_name.cpp b/dom/plugins/test/testplugin/nptest_name.cpp index 3b152c703ff..f9b57dfa8f2 100644 --- a/dom/plugins/test/testplugin/nptest_name.cpp +++ b/dom/plugins/test/testplugin/nptest_name.cpp @@ -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";