summaryrefslogtreecommitdiffstats
path: root/dom/events/test
diff options
context:
space:
mode:
authorTom Ritter <tom@mozilla.com>2018-02-20 15:36:16 -0600
committerwolfbeast <mcwerewolf@gmail.com>2018-03-14 11:32:10 +0100
commitb367c382417a8769d02dfb02639b0055dc62cef3 (patch)
tree8eb2e1b9425c2e517d600d6e57324b9d112e5910 /dom/events/test
parentf0b727eac28244e0fa24a6107dee44e83ad0f561 (diff)
downloadUXP-b367c382417a8769d02dfb02639b0055dc62cef3.tar
UXP-b367c382417a8769d02dfb02639b0055dc62cef3.tar.gz
UXP-b367c382417a8769d02dfb02639b0055dc62cef3.tar.lz
UXP-b367c382417a8769d02dfb02639b0055dc62cef3.tar.xz
UXP-b367c382417a8769d02dfb02639b0055dc62cef3.zip
Bug 1430173 - Update tests for 2ms timers. r=baku, a=RyanVM
MozReview-Commit-ID: 6xhQ71a5rDU --HG-- extra : transplant_source : %C2%D3%A7It%0Cg%92h%BB%3A%95%A2%0D.%86%B9C%9B%2B
Diffstat (limited to 'dom/events/test')
-rw-r--r--dom/events/test/test_eventTimeStamp.html26
1 files changed, 14 insertions, 12 deletions
diff --git a/dom/events/test/test_eventTimeStamp.html b/dom/events/test/test_eventTimeStamp.html
index a3d096432..107a21f87 100644
--- a/dom/events/test/test_eventTimeStamp.html
+++ b/dom/events/test/test_eventTimeStamp.html
@@ -60,8 +60,8 @@ function testRegularEvents() {
var timeBeforeEvent = window.performance.now();
window.addEventListener("load", function(evt) {
var timeAfterEvent = window.performance.now();
- ok(evt.timeStamp > timeBeforeEvent &&
- evt.timeStamp < timeAfterEvent,
+ ok(evt.timeStamp >= timeBeforeEvent &&
+ evt.timeStamp <= timeAfterEvent,
"Event timestamp (" + evt.timeStamp + ") is in expected range: (" +
timeBeforeEvent + ", " + timeAfterEvent + ")");
testWorkerEvents();
@@ -74,11 +74,12 @@ function testWorkerEvents() {
var worker = new Worker(window.URL.createObjectURL(blob));
worker.onmessage = function(evt) {
var timeAfterEvent = window.performance.now();
- ok(evt.data > timeBeforeEvent &&
- evt.data < timeAfterEvent,
- "Event timestamp in dedicated worker (" + evt.data +
- ") is in expected range: (" +
- timeBeforeEvent + ", " + timeAfterEvent + ")");
+ // Comparing times across timelines may break now
+ // ok(evt.data >= timeBeforeEvent &&
+ // evt.data <= timeAfterEvent,
+ // "Event timestamp in dedicated worker (" + evt.data +
+ // ") is in expected range: (" +
+ // timeBeforeEvent + ", " + timeAfterEvent + ")");
worker.terminate();
testSharedWorkerEvents();
};
@@ -97,11 +98,12 @@ function testSharedWorkerEvents() {
var worker = new SharedWorker(window.URL.createObjectURL(blob));
worker.port.onmessage = function(evt) {
var timeAfterEvent = window.performance.now();
- ok(evt.data > 0 &&
- evt.data < timeAfterEvent - timeBeforeWorkerCreation,
- "Event timestamp in shared worker (" + evt.data +
- ") is in expected range: (0, " +
- (timeAfterEvent - timeBeforeWorkerCreation) + ")");
+ // Comparing times across timelines may break now
+ // ok(evt.data >= 0 &&
+ // evt.data <= timeAfterEvent - timeBeforeWorkerCreation,
+ // "Event timestamp in shared worker (" + evt.data +
+ // ") is in expected range: (0, " +
+ // (timeAfterEvent - timeBeforeWorkerCreation) + ")");
worker.port.close();
finishTests();
};