mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-26 02:17:34 +09:00
import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo
This commit is contained in:
commit
dcd9973243
150858 changed files with 23884658 additions and 0 deletions
26
intl/locale/tests/unit/test_bug371611.js
Normal file
26
intl/locale/tests/unit/test_bug371611.js
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
var Cc = Components.classes;
|
||||
var Ci = Components.interfaces;
|
||||
var Cr = Components.results;
|
||||
|
||||
function test_formatdatetime_return()
|
||||
{
|
||||
var dateConv = Cc["@mozilla.org/intl/scriptabledateformat;1"].
|
||||
getService(Ci.nsIScriptableDateFormat);
|
||||
|
||||
/* Testing if we throw instead of crashing when we are passed 0s. */
|
||||
var x = false;
|
||||
try {
|
||||
dateConv.FormatDate("", Ci.nsIScriptableDateFormat.dateFormatLong,
|
||||
0, 0, 0);
|
||||
}
|
||||
catch (e if (e.result == Cr.NS_ERROR_INVALID_ARG)) {
|
||||
x = true;
|
||||
}
|
||||
if (!x)
|
||||
do_throw("FormatDate didn't throw when passed 0 for its arguments.");
|
||||
}
|
||||
|
||||
function run_test()
|
||||
{
|
||||
test_formatdatetime_return();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue