bug 435322 - Places History Visit Date doesn't show _date_ portion properly, additional fix to avoid unit test orange randomness.

This commit is contained in:
Marco Bonardo 2009-03-05 15:34:41 +01:00
Родитель 931e536e9b
Коммит dba36a263d
1 изменённых файлов: 10 добавлений и 1 удалений

Просмотреть файл

@ -109,6 +109,9 @@
midnight.setSeconds(0);
midnight.setMilliseconds(0);
// Cleanup.
bh.removeAllPages();
// Add a visit 1ms before midnight.
hs.addVisit(uri("http://before.midnight.com/"),
(midnight.getTime() - 1) * 1000,
@ -166,7 +169,13 @@
if (node.uri == "http://at.midnight.com/" ||
node.uri == "http://after.midnight.com/")
dateFormat = Ci.nsIScriptableDateFormat.dateFormatNone;
else if (node.uri == "http://before.midnight.com/")
dateFormat = Ci.nsIScriptableDateFormat.dateFormatShort;
else {
// Avoid to test spurious uris, due to how the test works
// a redirecting uri could be put in the tree while we test.
break;
}
var timeStr = ds.FormatDateTime("", dateFormat,
Ci.nsIScriptableDateFormat.timeFormatNoSeconds,
timeObj.getFullYear(), timeObj.getMonth() + 1,