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

Issue 2399153002: Fix precision problem in TouchActionBrowserTest. (Closed)

Created:
4 years, 2 months ago by huapengl
Modified:
4 years, 2 months ago
CC:
chromium-reviews, darin-cc_chromium.org, dtapuska+chromiumwatch_chromium.org, jam
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix precision problem in TouchActionBrowserTest. Comparing floating point numbers can lead to unexpected result on different devices. This prevents the test from getting stuck in DoTouchScroll due to minimal floating point deviations. As the test is only verifying that scrolling happened at all or not, just divide the expected value by 2 instead of trying to finesse the problem with epsilons. BUG=653644 Committed: https://crrev.com/9b94ba4283bddbe9ee1007aba471d6636fa87c67 Cr-Commit-Position: refs/heads/master@{#423898}

Patch Set 1 #

Total comments: 4

Patch Set 2 : Use precision for comparison in scroll test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2 lines, -2 lines) Patch
M content/browser/renderer_host/input/touch_action_browsertest.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 12 (5 generated)
huapengl
Hi, Can you please take a look? Thanks!
4 years, 2 months ago (2016-10-06 19:22:05 UTC) #3
aelias_OOO_until_Jul13
https://codereview.chromium.org/2399153002/diff/1/content/browser/renderer_host/input/touch_action_browsertest.cc File content/browser/renderer_host/input/touch_action_browsertest.cc (right): https://codereview.chromium.org/2399153002/diff/1/content/browser/renderer_host/input/touch_action_browsertest.cc#newcode169 content/browser/renderer_host/input/touch_action_browsertest.cc:169: distance.y()) > std::numeric_limits<double>::epsilon()) { This is the second time ...
4 years, 2 months ago (2016-10-06 19:33:51 UTC) #4
huapengl
https://codereview.chromium.org/2399153002/diff/1/content/browser/renderer_host/input/touch_action_browsertest.cc File content/browser/renderer_host/input/touch_action_browsertest.cc (right): https://codereview.chromium.org/2399153002/diff/1/content/browser/renderer_host/input/touch_action_browsertest.cc#newcode169 content/browser/renderer_host/input/touch_action_browsertest.cc:169: distance.y()) > std::numeric_limits<double>::epsilon()) { On 2016/10/06 19:33:51, aelias wrote: ...
4 years, 2 months ago (2016-10-07 16:59:40 UTC) #5
aelias_OOO_until_Jul13
lgtm
4 years, 2 months ago (2016-10-07 17:06:19 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2399153002/20001
4 years, 2 months ago (2016-10-07 17:06:45 UTC) #9
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 2 months ago (2016-10-07 17:43:55 UTC) #10
commit-bot: I haz the power
4 years, 2 months ago (2016-10-07 17:45:20 UTC) #12
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/9b94ba4283bddbe9ee1007aba471d6636fa87c67
Cr-Commit-Position: refs/heads/master@{#423898}

Powered by Google App Engine
This is Rietveld 408576698