From d4e320ed46b232a850e71bfd87d4af8f4664615a Mon Sep 17 00:00:00 2001 From: Nick Fitzgerald Date: Mon, 10 Aug 2015 12:01:39 -0700 Subject: [PATCH] Bug 1192941 - The browser_webconsole_output_05.js test should always use deterministic test data; r=jlongster --- .../test/browser_webconsole_output_05.js | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/browser/devtools/webconsole/test/browser_webconsole_output_05.js b/browser/devtools/webconsole/test/browser_webconsole_output_05.js index 8e754bb883c..bcf3e82335a 100644 --- a/browser/devtools/webconsole/test/browser_webconsole_output_05.js +++ b/browser/devtools/webconsole/test/browser_webconsole_output_05.js @@ -11,7 +11,14 @@ const TEST_URI = "data:text/html;charset=utf8,test for console output - 05"; const ELLIPSIS = Services.prefs.getComplexValue("intl.ellipsis", Ci.nsIPrefLocalizedString).data; -let dateNow = Date.now(); +// March, 1960: The first implementation of Lisp. From Wikipedia: +// +// > Lisp was first implemented by Steve Russell on an IBM 704 computer. Russell +// > had read McCarthy's paper, and realized (to McCarthy's surprise) that the +// > Lisp eval function could be implemented in machine code. The result was a +// > working Lisp interpreter which could be used to run Lisp programs, or more +// > properly, 'evaluate Lisp expressions.' +let testDate = -310435200000; let inputTests = [ // 0 @@ -49,9 +56,9 @@ let inputTests = [ // 5 { - input: "new Date(" + dateNow + ")", - output: "Date " + (new Date(dateNow)).toISOString(), - printOutput: (new Date(dateNow)).toString(), + input: "new Date(" + testDate + ")", + output: "Date " + (new Date(testDate)).toISOString(), + printOutput: (new Date(testDate)).toString(), inspectable: true, }, @@ -132,6 +139,6 @@ function test() { } function finishUp() { - inputTests = dateNow = null; + inputTests = testDate = null; finishTest(); }