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

Issue 1394303007: [WebViewLayoutTest] Fix potential rounding error in testBatteryApi() layout test. (Closed)

Created:
5 years, 2 months ago by timvolodine
Modified:
5 years, 2 months ago
CC:
chromium-reviews, android-webview-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[WebViewLayoutTest] Fix potential rounding error in testBatteryApi() layout test. The battery.level precision test isInteger(battery.level * 100) can occasionally fail due to rounding error, e.g. (0.58 * 100) % 1 = 0.9999999999999929. This patch uses toPrecision and toString methods instead to correct this issue. BUG= Committed: https://crrev.com/beebf8aac8acd93bd045d94a5835e12b4992176e Cr-Commit-Position: refs/heads/master@{#354498} Committed: https://crrev.com/863fd741f32361a9154a61482e29944befe767ca Cr-Commit-Position: refs/heads/master@{#354533}

Patch Set 1 #

Patch Set 2 : fix the precision test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+4 lines, -11 lines) Patch
M android_webview/tools/WebViewShell/test/blink-apis/battery-status/battery-callback.html View 1 3 chunks +2 lines, -9 lines 0 comments Download
M android_webview/tools/WebViewShell/test/blink-apis/battery-status/battery-callback-expected.txt View 1 1 chunk +2 lines, -2 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 13 (4 generated)
timvolodine
5 years, 2 months ago (2015-10-14 15:44:34 UTC) #2
Michael van Ouwerkerk
lgtm
5 years, 2 months ago (2015-10-15 14:57:00 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1394303007/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1394303007/1
5 years, 2 months ago (2015-10-16 12:14:47 UTC) #5
commit-bot: I haz the power
Committed patchset #1 (id:1)
5 years, 2 months ago (2015-10-16 12:25:37 UTC) #6
commit-bot: I haz the power
Patchset 1 (id:??) landed as https://crrev.com/beebf8aac8acd93bd045d94a5835e12b4992176e Cr-Commit-Position: refs/heads/master@{#354498}
5 years, 2 months ago (2015-10-16 12:26:14 UTC) #7
johnme
A revert of this CL (patchset #1 id:1) has been created in https://codereview.chromium.org/1406243002/ by johnme@chromium.org. ...
5 years, 2 months ago (2015-10-16 14:00:49 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1394303007/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1394303007/20001
5 years, 2 months ago (2015-10-16 16:58:56 UTC) #11
commit-bot: I haz the power
Committed patchset #2 (id:20001)
5 years, 2 months ago (2015-10-16 17:09:39 UTC) #12
commit-bot: I haz the power
5 years, 2 months ago (2015-10-16 17:10:51 UTC) #13
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/863fd741f32361a9154a61482e29944befe767ca
Cr-Commit-Position: refs/heads/master@{#354533}

Powered by Google App Engine
This is Rietveld 408576698