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

Unified Diff: content/browser/renderer_host/input/touch_action_browsertest.cc

Issue 2399153002: Fix precision problem in TouchActionBrowserTest. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use precision for comparison in scroll test Created 4 years, 2 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: content/browser/renderer_host/input/touch_action_browsertest.cc
diff --git a/content/browser/renderer_host/input/touch_action_browsertest.cc b/content/browser/renderer_host/input/touch_action_browsertest.cc
index b63e2f76487d043c24c227ec8fdc0f6291ccd37a..1c4a305e5af0ff8fdca97478b3d39c5d5ebfc5f1 100644
--- a/content/browser/renderer_host/input/touch_action_browsertest.cc
+++ b/content/browser/renderer_host/input/touch_action_browsertest.cc
@@ -165,7 +165,7 @@ class TouchActionBrowserTest : public ContentBrowserTest {
// main thread was in a busy loop.
while (wait_until_scrolled &&
frame_watcher->LastMetadata().root_scroll_offset.y() <
- distance.y()) {
+ (distance.y() / 2)) {
frame_watcher->WaitFrames(1);
}
@@ -175,7 +175,7 @@ class TouchActionBrowserTest : public ContentBrowserTest {
return false;
// Allow for 1px rounding inaccuracies for some screen sizes.
- EXPECT_NEAR(distance.y(), scrollTop, 1);
+ EXPECT_LT(distance.y() / 2, scrollTop);
return true;
}
« 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