diff options
author | Moonchild <moonchild@palemoon.org> | 2020-05-04 13:11:28 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2020-05-04 13:11:28 +0000 |
commit | ca826767f07eb3b463f660b94f9416ecb5065611 (patch) | |
tree | 6aaad1b3ceb62cd2977add979d69c9e48e103f72 /editor/libeditor | |
parent | ea491d0383e89839b831fabc11e7e0d6732659dd (diff) | |
download | uxp-ca826767f07eb3b463f660b94f9416ecb5065611.tar.gz |
Issue #1517 - Remove dom.event.highrestimestamp.enabled pref
This resolves #1517
Diffstat (limited to 'editor/libeditor')
-rw-r--r-- | editor/libeditor/tests/test_dom_input_event_on_htmleditor.html | 20 | ||||
-rw-r--r-- | editor/libeditor/tests/test_dom_input_event_on_texteditor.html | 20 |
2 files changed, 10 insertions, 30 deletions
diff --git a/editor/libeditor/tests/test_dom_input_event_on_htmleditor.html b/editor/libeditor/tests/test_dom_input_event_on_htmleditor.html index d1716a228e..dc8790750c 100644 --- a/editor/libeditor/tests/test_dom_input_event_on_htmleditor.html +++ b/editor/libeditor/tests/test_dom_input_event_on_htmleditor.html @@ -67,21 +67,11 @@ function runTests() "input event is fired on unexpected element: " + aEvent.target.tagName); ok(!aEvent.cancelable, "input event must not be cancelable"); ok(aEvent.bubbles, "input event must be bubbles"); - if (SpecialPowers.getBoolPref("dom.event.highrestimestamp.enabled")) { - var duration = Math.abs(window.performance.now() - aEvent.timeStamp); - ok(duration < 30 * 1000, - "perhaps, timestamp wasn't set correctly :" + aEvent.timeStamp + - " (expected it to be within 30s of the current time but it " + - "differed by " + duration + "ms)"); - } else { - var eventTime = new Date(aEvent.timeStamp); - var duration = Math.abs(Date.now() - aEvent.timeStamp); - ok(duration < 30 * 1000, - "perhaps, timestamp wasn't set correctly :" + - eventTime.toLocaleString() + - " (expected it to be within 30s of the current time but it " + - "differed by " + duration + "ms)"); - } + var duration = Math.abs(window.performance.now() - aEvent.timeStamp); + ok(duration < 30 * 1000, + "perhaps, timestamp wasn't set correctly :" + aEvent.timeStamp + + " (expected it to be within 30s of the current time but it " + + "differed by " + duration + "ms)"); inputEvent = aEvent; }; diff --git a/editor/libeditor/tests/test_dom_input_event_on_texteditor.html b/editor/libeditor/tests/test_dom_input_event_on_texteditor.html index b1395e99c6..abdd5f5d0c 100644 --- a/editor/libeditor/tests/test_dom_input_event_on_texteditor.html +++ b/editor/libeditor/tests/test_dom_input_event_on_texteditor.html @@ -41,21 +41,11 @@ function runTests() "input event is fired on unexpected element: " + aEvent.target.tagName); ok(!aEvent.cancelable, "input event must not be cancelable"); ok(aEvent.bubbles, "input event must be bubbles"); - if (SpecialPowers.getBoolPref("dom.event.highrestimestamp.enabled")) { - var duration = Math.abs(window.performance.now() - aEvent.timeStamp); - ok(duration < 30 * 1000, - "perhaps, timestamp wasn't set correctly :" + aEvent.timeStamp + - " (expected it to be within 30s of the current time but it " + - "differed by " + duration + "ms)"); - } else { - var eventTime = new Date(aEvent.timeStamp); - var duration = Math.abs(Date.now() - aEvent.timeStamp); - ok(duration < 30 * 1000, - "perhaps, timestamp wasn't set correctly :" + - eventTime.toLocaleString() + - " (expected it to be within 30s of the current time but it " + - "differed by " + duration + "ms)"); - } + var duration = Math.abs(window.performance.now() - aEvent.timeStamp); + ok(duration < 30 * 1000, + "perhaps, timestamp wasn't set correctly :" + aEvent.timeStamp + + " (expected it to be within 30s of the current time but it " + + "differed by " + duration + "ms)"); inputEvent = aEvent; }; |