summaryrefslogtreecommitdiffstats
path: root/dom/events/test
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-03-15 09:11:31 +0100
committerwolfbeast <mcwerewolf@gmail.com>2018-03-15 09:11:31 +0100
commit82b361dc4463b13ebda30090e239db487f5aa308 (patch)
treefdc6fd06e695188735d636da57b02b6c7e0c1c5f /dom/events/test
parent4bb98e2b61ce75d7f5d19398b658441a7ceed04b (diff)
parent71429dc7ecc496c5924c770746e8c28449ecb7a2 (diff)
downloadUXP-82b361dc4463b13ebda30090e239db487f5aa308.tar
UXP-82b361dc4463b13ebda30090e239db487f5aa308.tar.gz
UXP-82b361dc4463b13ebda30090e239db487f5aa308.tar.lz
UXP-82b361dc4463b13ebda30090e239db487f5aa308.tar.xz
UXP-82b361dc4463b13ebda30090e239db487f5aa308.zip
Merge branch 'ported-upstream'
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();
};