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

Issue 1155623002: Added CGFloat comparison functions. (Closed)

Created:
5 years, 7 months ago by kkhorimoto
Modified:
5 years, 6 months ago
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Added CGFloat comparison functions. Comparing CGFloat values using direct equality was causing flakes in CRWWebController's PageScrollState unittests, so compare using CGFloat's epsilon. BUG=474290 Committed: https://crrev.com/53ce056bd3c312723adca2d3245d75a0599d904c Cr-Commit-Position: refs/heads/master@{#332223}

Patch Set 1 #

Patch Set 2 : #

Total comments: 2

Patch Set 3 : used std::numeric_limits<CGFloat>::epsilon() #

Patch Set 4 : #

Patch Set 5 : #

Patch Set 6 : #

Total comments: 2

Patch Set 7 : Include gtest_mac.h from callers instead of adding it to ui_cocoa_test_helper.h #

Unified diffs Side-by-side diffs Delta from patch set Stats (+22 lines, -12 lines) Patch
M ios/web/web_state/ui/crw_web_controller_unittest.mm View 1 2 3 4 chunks +12 lines, -7 lines 0 comments Download
M testing/gtest_mac.h View 1 1 chunk +9 lines, -0 lines 0 comments Download
M ui/gfx/test/ui_cocoa_test_helper.h View 1 2 3 4 6 1 chunk +0 lines, -5 lines 0 comments Download
M ui/message_center/cocoa/tray_view_controller_unittest.mm View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 31 (12 generated)
kkhorimoto
5 years, 7 months ago (2015-05-21 20:11:31 UTC) #2
kkhorimoto
5 years, 7 months ago (2015-05-21 20:24:01 UTC) #4
Eugene But (OOO till 7-30)
lgtm with suggestion https://codereview.chromium.org/1155623002/diff/20001/ios/web/web_state/ui/crw_web_controller_unittest.mm File ios/web/web_state/ui/crw_web_controller_unittest.mm (right): https://codereview.chromium.org/1155623002/diff/20001/ios/web/web_state/ui/crw_web_controller_unittest.mm#newcode920 ios/web/web_state/ui/crw_web_controller_unittest.mm:920: return std::fabs(val1 - val2) < DBL_EPSILON; ...
5 years, 7 months ago (2015-05-21 21:13:11 UTC) #5
kkhorimoto
https://codereview.chromium.org/1155623002/diff/20001/ios/web/web_state/ui/crw_web_controller_unittest.mm File ios/web/web_state/ui/crw_web_controller_unittest.mm (right): https://codereview.chromium.org/1155623002/diff/20001/ios/web/web_state/ui/crw_web_controller_unittest.mm#newcode920 ios/web/web_state/ui/crw_web_controller_unittest.mm:920: return std::fabs(val1 - val2) < DBL_EPSILON; On 2015/05/21 21:13:11, ...
5 years, 7 months ago (2015-05-21 22:07:09 UTC) #6
stuartmorgan
LGTM. But Eric and I talked about our handling of floats in scrolling code at ...
5 years, 7 months ago (2015-05-21 22:31:46 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1155623002/60001
5 years, 7 months ago (2015-05-22 17:23:12 UTC) #10
kkhorimoto
On 2015/05/21 22:31:46, stuartmorgan wrote: > LGTM. > > But Eric and I talked about ...
5 years, 7 months ago (2015-05-22 17:25:09 UTC) #11
baxley
On 2015/05/22 17:25:09, kkhorimoto_ wrote: > On 2015/05/21 22:31:46, stuartmorgan wrote: > > LGTM. > ...
5 years, 7 months ago (2015-05-22 17:42:56 UTC) #12
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_compile_dbg_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_compile_dbg_ng/builds/56102)
5 years, 7 months ago (2015-05-22 17:57:57 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1155623002/100001
5 years, 6 months ago (2015-05-27 22:08:26 UTC) #17
kkhorimoto
+danakj for gfx
5 years, 6 months ago (2015-05-27 22:13:21 UTC) #20
danakj
https://codereview.chromium.org/1155623002/diff/100001/ui/gfx/test/ui_cocoa_test_helper.h File ui/gfx/test/ui_cocoa_test_helper.h (right): https://codereview.chromium.org/1155623002/diff/100001/ui/gfx/test/ui_cocoa_test_helper.h#newcode14 ui/gfx/test/ui_cocoa_test_helper.h:14: #import "testing/gtest_mac.h" This is weird, no? Why not just ...
5 years, 6 months ago (2015-05-28 20:59:40 UTC) #21
kkhorimoto
+ stevenjb for tray_view_controller_unittest.mm https://codereview.chromium.org/1155623002/diff/100001/ui/gfx/test/ui_cocoa_test_helper.h File ui/gfx/test/ui_cocoa_test_helper.h (right): https://codereview.chromium.org/1155623002/diff/100001/ui/gfx/test/ui_cocoa_test_helper.h#newcode14 ui/gfx/test/ui_cocoa_test_helper.h:14: #import "testing/gtest_mac.h" On 2015/05/28 20:59:40, ...
5 years, 6 months ago (2015-05-30 00:29:50 UTC) #23
stevenjb
rubber stamp lgtm
5 years, 6 months ago (2015-06-01 16:22:24 UTC) #24
danakj
ui/gfx LGTM
5 years, 6 months ago (2015-06-01 16:59:06 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1155623002/120001
5 years, 6 months ago (2015-06-01 17:15:09 UTC) #28
commit-bot: I haz the power
Committed patchset #7 (id:120001)
5 years, 6 months ago (2015-06-01 18:18:09 UTC) #29
commit-bot: I haz the power
Patchset 7 (id:??) landed as https://crrev.com/53ce056bd3c312723adca2d3245d75a0599d904c Cr-Commit-Position: refs/heads/master@{#332223}
5 years, 6 months ago (2015-06-01 18:20:14 UTC) #30
sdefresne
5 years, 6 months ago (2015-06-03 07:48:40 UTC) #31
Message was sent while issue was closed.
A revert of this CL (patchset #7 id:120001) has been created in
https://codereview.chromium.org/1168523004/ by sdefresne@chromium.org.

The reason for reverting is: Reverting because it cause the downstream waterfall
to be flaky..

Powered by Google App Engine
This is Rietveld 408576698