From 56cb90a482737ae5252ac8b7ccbc0aff0b309410 Mon Sep 17 00:00:00 2001 From: Moonchild Date: Mon, 4 May 2020 13:11:28 +0000 Subject: Issue #1517 - Remove dom.event.highrestimestamp.enabled pref This resolves #1517 --- .../tests/test_dom_input_event_on_htmleditor.html | 20 +++++--------------- .../tests/test_dom_input_event_on_texteditor.html | 20 +++++--------------- 2 files changed, 10 insertions(+), 30 deletions(-) (limited to 'editor') 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 d1716a228..dc8790750 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 b1395e99c..abdd5f5d0 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; }; -- cgit v1.2.3