Fixed a test where a method was expected to be called but it wasn't.

A recent optimization in the code made that second call unneeded as so
our expectation is not met anymore (for good so).

BUG=chromium-os:18430
TEST=Metrics unit tests should pass.

Change-Id: I1162dc657156ee9207b904ab544b0f151eec0453
Reviewed-on: http://gerrit.chromium.org/gerrit/5302
Reviewed-by: Julian Pastarmov <pastarmovj@chromium.org>
Tested-by: Julian Pastarmov <pastarmovj@chromium.org>
This commit is contained in:
Julian Pastarmov 2011-08-04 11:15:13 +02:00
parent 70b7abd84f
commit 0e5debf2d5
1 changed files with 2 additions and 2 deletions

View File

@ -135,8 +135,8 @@ void MetricsLibraryTest::VerifyEnabledCacheHit(bool to_value) {
EXPECT_CALL(*device_policy_, GetMetricsEnabled(_))
.WillOnce(SetMetricsPolicy(!to_value));
ASSERT_EQ(!to_value, lib_.AreMetricsEnabled());
EXPECT_CALL(*device_policy_, GetMetricsEnabled(_))
.WillOnce(SetMetricsPolicy(to_value));
ON_CALL(*device_policy_, GetMetricsEnabled(_))
.WillByDefault(SetMetricsPolicy(to_value));
if (lib_.AreMetricsEnabled() == !to_value)
return;
}