Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(49)

Unified Diff: third_party/WebKit/LayoutTests/fast/events/hr-timestamp/input-events.html

Issue 2784913002: Fix flaky hi-resolution event timestamp test. (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/events/hr-timestamp/input-events.html
diff --git a/third_party/WebKit/LayoutTests/fast/events/hr-timestamp/input-events.html b/third_party/WebKit/LayoutTests/fast/events/hr-timestamp/input-events.html
index 5994e7c203e2470a57eeb87c32af0d569958be15..91314c694e7913a8066dfd7772b744a15daa1916 100644
--- a/third_party/WebKit/LayoutTests/fast/events/hr-timestamp/input-events.html
+++ b/third_party/WebKit/LayoutTests/fast/events/hr-timestamp/input-events.html
@@ -24,7 +24,7 @@ function createTest(eventName, dispatchEventFn) {
async_test(function(t) {
document.addEventListener(eventName, t.step_func(function(e) {
const platformTimestamp = eventSender.lastEventTimestamp(); // in seconds
- const expectedTimestamp = internals.monotonicTimeToZeroBasedDocumentTime(platformTimestamp) * 1000; // in milliseconds
+ const expectedTimestamp = Math.floor((internals.monotonicTimeToZeroBasedDocumentTime(platformTimestamp) * 1000) / 0.005) * 0.005;
assert_approx_equals(e.timeStamp, expectedTimestamp, 0.005);
t.done();
}));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698