summaryrefslogtreecommitdiffstats
path: root/editor/libeditor/tests/test_dom_input_event_on_texteditor.html
diff options
context:
space:
mode:
Diffstat (limited to 'editor/libeditor/tests/test_dom_input_event_on_texteditor.html')
-rw-r--r--editor/libeditor/tests/test_dom_input_event_on_texteditor.html20
1 files changed, 5 insertions, 15 deletions
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;
};