Closed Bug 561528 Opened 14 years ago Closed 14 years ago

browser_sanitize-timespans.js: |new Date().getMinutes()| usage issue

Categories

(Toolkit :: Places, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla2.0b5

People

(Reporter: sgautherie, Assigned: jdm)

Details

Attachments

(1 file)

Bug 467997 comment 10:
{
Johnathan Nightingale [:johnath]      2010-04-20 07:25:03 PDT

I notice that this test contains the
line:

var minutesSinceMidnight = new Date().getMinutes();

with minutesSinceMidnight used as a guard around various tests. (c.f.
http://mxr.mozilla.org/mozilla-central/source/browser/base/content/test/browser_sanitize-timespans.js#14
and then
http://mxr.mozilla.org/mozilla-central/source/browser/base/content/test/browser_sanitize-timespans.js#182
)

new Date().getMinutes() returns minutes since the top of the hour, not since
midnight, so all the if blocks testing for minutes > 60 will permanently fail,
which means we're not running those tests.
}
Assignee: nobody → josh
Attached patch PatchSplinter Review
Simple fix that makes an extra six tests run (and pass!) at 3:45am on my local machine.
Attachment #466084 - Flags: review?
Attachment #466084 - Flags: review? → review?(mconnor)
Attachment #466084 - Flags: review?(mconnor) → review?(ehsan)
Attachment #466084 - Flags: review?(ehsan) → review+
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Flags: in-testsuite+
Target Milestone: --- → mozilla2.0b5
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: