Commit 13dbde4f authored by Xiaohan Wang's avatar Xiaohan Wang Committed by Commit Bot

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: default avatarMounir Lamouri <mlamouri@chromium.org>
Commit-Queue: Xiaohan Wang <xhwang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#710857}
parent 24e516d8
This diff is collapsed.
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