Bug 467997 - browser_sanitize-timespans.js random failure when crossing midnight.
authorMarco Bonardo <mbonardo@mozilla.com>
Thu, 03 Mar 2011 13:51:01 +0100
changeset 63315 61d11ecb169b
parent 63314 82912051f423
child 63316 779f2ca8eb0c
push idunknown
push userunknown
push dateunknown
bugs467997
milestone2.0b13pre
Bug 467997 - browser_sanitize-timespans.js random failure when crossing midnight. r=sdwilsh a=tests-only
browser/base/content/test/browser_sanitize-timespans.js
--- a/browser/base/content/test/browser_sanitize-timespans.js
+++ b/browser/base/content/test/browser_sanitize-timespans.js
@@ -278,17 +278,17 @@ function setupHistory() {
   bhist.addPageWithDetails(makeURI("http://2hour.com/"), "Less than 2 hours ago", now_uSec - 90*60*1000000);
   bhist.addPageWithDetails(makeURI("http://2hour10minutes.com/"), "2 hours 10 minutes ago", now_uSec - 130*60*1000000);
   bhist.addPageWithDetails(makeURI("http://4hour.com/"), "Less than 4 hours ago", now_uSec - 180*60*1000000);
   bhist.addPageWithDetails(makeURI("http://4hour10minutes.com/"), "4 hours 10 minutesago", now_uSec - 250*60*1000000);
   
   let today = new Date();
   today.setHours(0);
   today.setMinutes(0);
-  today.setSeconds(30);
+  today.setSeconds(1);
   bhist.addPageWithDetails(makeURI("http://today.com/"), "Today", today.valueOf() * 1000);
   
   let lastYear = new Date();
   lastYear.setFullYear(lastYear.getFullYear() - 1);
   bhist.addPageWithDetails(makeURI("http://before-today.com/"), "Before Today", lastYear.valueOf() * 1000);
   
   // Confirm everything worked
   ok(bhist.isVisited(makeURI("http://10minutes.com/")), "Pretend visit to 10minutes.com should exist");
@@ -521,17 +521,17 @@ function setupDownloads() {
   finally {
     stmt.reset();
   }
 
   // Add "today" download
   let today = new Date();
   today.setHours(0);
   today.setMinutes(0);
-  today.setSeconds(30);
+  today.setSeconds(1);
   
   data = {
     id:   "5555554",
     name: "fakefile-today",
     source: "https://bugzilla.mozilla.org/show_bug.cgi?id=453440",
     target: "fakefile-today",
     startTime: today.valueOf() * 1000,  // 12:00:30am this morning, in uSec
     endTime: (today.valueOf() + 1000) * 1000, // 1 second later