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

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

Issue 2790173002: Fix flaky hr-timestamp/input-events.html (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 91314c694e7913a8066dfd7772b744a15daa1916..b0c4caee042811f0a86599795e27a5a69d5e2163 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
@@ -25,7 +25,9 @@ function createTest(eventName, dispatchEventFn) {
document.addEventListener(eventName, t.step_func(function(e) {
const platformTimestamp = eventSender.lastEventTimestamp(); // in seconds
const expectedTimestamp = Math.floor((internals.monotonicTimeToZeroBasedDocumentTime(platformTimestamp) * 1000) / 0.005) * 0.005;
- assert_approx_equals(e.timeStamp, expectedTimestamp, 0.005);
+ // Use 0.005001 instead of 0.005 to deal with floating point
+ // comparison issues.
+ assert_approx_equals(e.timeStamp, expectedTimestamp, 0.005001);
t.done();
}));
dispatchEventFn();
« 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