Files
tubestation/toolkit/components/mozintl/test/test_mozintl.js
Zibi Braniecki 5dd802ea19 Bug 1403318 - Remove mozIntl.PluralRules. r=anba
MozReview-Commit-ID: IqkGenuXYrv
2017-09-28 15:00:32 +02:00

28 lines
832 B
JavaScript

/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
function run_test() {
const mozIntl = Components.classes["@mozilla.org/mozintl;1"]
.getService(Components.interfaces.mozIMozIntl);
test_methods_presence(mozIntl);
test_methods_calling(mozIntl);
ok(true);
}
function test_methods_presence(mozIntl) {
equal(mozIntl.getCalendarInfo instanceof Function, true);
equal(mozIntl.getDisplayNames instanceof Function, true);
equal(mozIntl.getLocaleInfo instanceof Function, true);
equal(mozIntl.createDateTimeFormat instanceof Function, true);
}
function test_methods_calling(mozIntl) {
mozIntl.getCalendarInfo("pl");
mozIntl.getDisplayNames("ar");
mozIntl.getLocaleInfo("de");
mozIntl.createDateTimeFormat("fr");
ok(true);
}