Bug 1382071: Change a comparison in test_eventTimeStamp.html to consider its upper & lower bounds as part of the valid range. r=birtles, a=test-only
authorDaniel Holbert <dholbert@cs.stanford.edu>
Wed, 31 Jan 2018 12:17:36 -0500
changeset 454615 323cfb8ec74d7102698ace9735202e8e7bd25479
parent 454614 40d54bf9f2d0b9c9b9649bf58caf5c2f3856c364
child 454616 7a901ba2676d35d2c90f8236200985e5f51ae28b
push id1648
push usermtabara@mozilla.com
push dateThu, 01 Mar 2018 12:45:47 +0000
treeherdermozilla-release@cbb9688c2eeb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbirtles, test-only
bugs1382071
milestone59.0
Bug 1382071: Change a comparison in test_eventTimeStamp.html to consider its upper & lower bounds as part of the valid range. r=birtles, a=test-only MozReview-Commit-ID: 4FZDKqKZLHM
dom/events/test/test_eventTimeStamp.html
--- a/dom/events/test/test_eventTimeStamp.html
+++ b/dom/events/test/test_eventTimeStamp.html
@@ -55,35 +55,35 @@ function testRegularEvents() {
   if (document.readyState === "complete") {
     ok(false, "Onload event has already fired");
     finishTests();
     return;
   }
   var timeBeforeEvent = performance.now();
   addEventListener("load", function(evt) {
     var timeAfterEvent = performance.now();
-    ok(evt.timeStamp > timeBeforeEvent &&
-       evt.timeStamp < timeAfterEvent,
-       "Event timestamp (" + evt.timeStamp + ") is in expected range: (" +
-         timeBeforeEvent + ", " + timeAfterEvent + ")");
+    ok(evt.timeStamp >= timeBeforeEvent &&
+       evt.timeStamp <= timeAfterEvent,
+       "Event timestamp (" + evt.timeStamp + ") is in expected range: [" +
+         timeBeforeEvent + ", " + timeAfterEvent + "]");
     testWorkerEvents();
   });
 }
 
 function testWorkerEvents() {
   var blob = new Blob([ document.getElementById("worker-src").textContent ],
                       { type: "text/javascript" });
   var worker = new Worker(URL.createObjectURL(blob));
   worker.onmessage = function(evt) {
     var timeAfterEvent = performance.now() + performance.timeOrigin;
     ok(evt.data >= timeBeforeEvent &&
        evt.data <= timeAfterEvent,
        "Event timestamp in dedicated worker (" + evt.data +
-         ") is in expected range: (" +
-         timeBeforeEvent + ", " + timeAfterEvent + ")");
+         ") is in expected range: [" +
+         timeBeforeEvent + ", " + timeAfterEvent + "]");
     worker.terminate();
     testSharedWorkerEvents();
   };
   var timeBeforeEvent = performance.now() + performance.timeOrigin;
   worker.postMessage("");
 }
 
 function testSharedWorkerEvents() {