media: Use NiceMocks in WebMediaPlayerImplTest
Currently we are using StrictMocks in several places which force us to set several expectations unrelated to what is being tested, making the code harder to read. This CL updates these cases to use NiceMocks to solve this issue. Sepcific tests that do care about these mocks can still use EXPECT_CALL to setup expectations. This is also consistent with googlemock guidelines [1]: """ Our general recommendation is to use nice mocks (not yet the default) most of the time, use naggy mocks (the current default) when developing or debugging tests, and use strict mocks only as the last resort. """ [1] https://github.com/google/googletest/blob/master/googlemock/docs/cook_book.md#the-nice-the-strict-and-the-naggy-nicestrictnaggy Bug: 1018372 Test: Test cleanup only Change-Id: Ie639f2706f02c9701cb2f4ab2d2ed2658006fb32 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1879685Reviewed-by:Mounir Lamouri <mlamouri@chromium.org> Commit-Queue: Xiaohan Wang <xhwang@chromium.org> Cr-Commit-Position: refs/heads/master@{#710857}
Showing
This diff is collapsed.
Please register or sign in to comment