bug 607121 and bug 626180 - add sample non-Latin text to the test plugin description, to verify that we manage encodings properly. r+a=bsmedberg

This commit is contained in:
Jonathan Kew 2011-01-18 18:27:26 +00:00
parent 4ab69a9708
commit ed55ace99d
6 changed files with 25 additions and 6 deletions

View File

@ -53,7 +53,11 @@ function init_test() {
}
function start_test(plugin) {
is(plugin.description, "Plug-in for testing purposes.", "Test plugin had an incorrect description");
is(plugin.description, "Plug-in for testing purposes.\u2122 " +
"(\u0939\u093f\u0928\u094d\u0926\u0940 " +
"\u4e2d\u6587 " +
"\u0627\u0644\u0639\u0631\u0628\u064a\u0629)",
"Test plugin had an incorrect description");
is(plugin.version, "1.0.0.0", "Test plugin had an incorrect version");
ok(!plugin.disabled, "Test plugin should not be disabled");
ok(!plugin.blocklisted, "Test plugin should not be blocklisted");

View File

@ -21,7 +21,7 @@
<key>WebPluginName</key>
<string>Test Plug-in</string>
<key>WebPluginDescription</key>
<string>Plug-in for testing purposes.</string>
<string>Plug-in for testing purposes.™ (हिन्दी 中文 العربية)</string>
<key>WebPluginMIMETypes</key>
<dict>
<key>application/x-test</key>

View File

@ -58,7 +58,10 @@
using namespace std;
#define PLUGIN_NAME "Test Plug-in"
#define PLUGIN_DESCRIPTION "Plug-in for testing purposes."
#define PLUGIN_DESCRIPTION "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)"
#define PLUGIN_VERSION "1.0.0.0"
#define ARRAY_LENGTH(a) (sizeof(a)/sizeof(a[0]))

View File

@ -108,7 +108,11 @@ function run_test() {
registry += DELIM + "$\n";
}
registry += file.lastModifiedTime + DELIM + "0" + DELIM + "0" + DELIM + "$\n";
registry += "Plug-in for testing purposes." + DELIM + "$\n";
registry += "Plug-in for testing purposes.\u2122 " +
"(\u0939\u093f\u0928\u094d\u0926\u0940 " +
"\u4e2d\u6587 " +
"\u0627\u0644\u0639\u0631\u0628\u064a\u0629)" +
DELIM + "$\n";
registry += "Test Plug-in" + DELIM + "$\n";
registry += "1\n";
registry += "0" + DELIM + "application/x-test" + DELIM + "Test mimetype" +
@ -121,7 +125,11 @@ function run_test() {
// If the plugin was not rescanned then this version will not be correct
do_check_eq(plugin.version, "1.0.0.0");
do_check_eq(plugin.description, "Plug-in for testing purposes.");
do_check_eq(plugin.description,
"Plug-in for testing purposes.\u2122 " +
"(\u0939\u093f\u0928\u094d\u0926\u0940 " +
"\u4e2d\u6587 " +
"\u0627\u0644\u0639\u0631\u0628\u064a\u0629)");
// If the plugin registry was not read then the plugin will not be disabled
do_check_true(plugin.disabled);
do_check_false(plugin.blocklisted);

View File

@ -74,7 +74,11 @@ function run_test_1() {
AddonManager.getAddonByID(gID, function(p) {
do_check_neq(p, null);
do_check_eq(p.name, "Test Plug-in");
do_check_eq(p.description, "Plug-in for testing purposes.");
do_check_eq(p.description,
"Plug-in for testing purposes.\u2122 " +
"(\u0939\u093f\u0928\u094d\u0926\u0940 " +
"\u4e2d\u6587 " +
"\u0627\u0644\u0639\u0631\u0628\u064a\u0629)");
do_check_eq(p.creator, null);
do_check_eq(p.version, "1.0.0.0");
do_check_eq(p.type, "plugin");