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

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: 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..cfb95e56a3a84412b782826e4fa42a7be95d802e 100644
--- a/content/browser/renderer_host/input/touch_action_browsertest.cc
+++ b/content/browser/renderer_host/input/touch_action_browsertest.cc
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <limits>
#include <utility>
#include "base/auto_reset.h"
@@ -164,8 +165,8 @@ class TouchActionBrowserTest : public ContentBrowserTest {
// Expect that the compositor scrolled at least one pixel while the
// main thread was in a busy loop.
while (wait_until_scrolled &&
- frame_watcher->LastMetadata().root_scroll_offset.y() <
- distance.y()) {
+ (frame_watcher->LastMetadata().root_scroll_offset.y() -
+ distance.y()) > std::numeric_limits<double>::epsilon()) {
aelias_OOO_until_Jul13 2016/10/06 19:33:51 This is the second time we've had precision proble
huapengl 2016/10/07 16:59:40 Done.
frame_watcher->WaitFrames(1);
}
« 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