Commit 99419231 authored by Nate Fischer's avatar Nate Fischer Committed by Commit Bot

AW UMA: undo rounding workaround in unit test

During componentization, a rounding workaround was added to
android_metrics_service_client_unittest, specifying a number slightly
under 0.1 rather than 0.1 itself. It appears this was working around the
fact that "0.1f" causes rounding issues that "0.1" does not.

There's no benefit to specifying "0.1f" over "0.1" (the return type is
double, not float), and since the latter does not have any rounding
issues (it was quite reliable when the test lived in //android_webview/
and causes no issues in the new component), this CL removes the
workaround and goes back to the desired value.

Bug: 1015655
Test: run_components_unittests -f AndroidMetricsServiceClientTest.*
Change-Id: I0ddec7da8ed7c98226cec1e49fd312155501ec8d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2051365
Commit-Queue: Tobias Sargeant <tobiasjs@chromium.org>
Auto-Submit: Nate Fischer <ntfschr@chromium.org>
Reviewed-by: default avatarTobias Sargeant <tobiasjs@chromium.org>
Cr-Commit-Position: refs/heads/master@{#740601}
parent ecd391b7
......@@ -87,12 +87,7 @@ class TestClient : public AndroidMetricsServiceClient {
return metrics::ChromeUserMetricsExtension::CHROME;
}
double GetPackageNameLimitRate() override {
// This is slightly under 0.1 to ensure
// TestPackageNameLogic_SampleRateAboveTen passes. There's something odd
// with the rounding which causes that test to fail if this is 0.1
return 0.0999;
}
double GetPackageNameLimitRate() override { return 0.1; }
bool ShouldWakeMetricsService() override {
NOTREACHED();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment