-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Start of a framework for WebMediaPlayerImpl tests #1521
Conversation
139869a
to
5ae9a31
Compare
Change-Id: I3bba96a1d17f6eeedf72df7f7d57c822f3dfb0bd
Change-Id: I810d406f719e9b78e20ce5ed25a0f90f60ec9a1b
5ae9a31
to
b6b108c
Compare
|
||
namespace { | ||
SbDecodeTargetGraphicsContextProvider* | ||
MockGetSbDecodeTargetGraphicsContextProvider() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider naming it Stub****, as it's not a mock.
using ::cobalt::media::WebMediaPlayerImpl; | ||
using ::media::ChunkDemuxer; | ||
using ::testing::NiceMock; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: remove redundant empty line.
bool HasAudio() { return wmpi_->HasAudio(); } | ||
bool HasVideo() { return wmpi_->HasVideo(); } | ||
bool IsPaused() { return wmpi_->IsPaused(); } | ||
float GetPlaybackRate() { return wmpi_->GetPlaybackRate(); } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider removing these functions, and let the individual test to verify on them directly.
EXPECT_TRUE(wmpi_->IsPaused());
should be as good as (maybe a little better than) EXPECT_TRUE(IsPaused());
base::Bind(MockGetSbDecodeTargetGraphicsContextProvider), &client_, | ||
&client_, true, false, true, | ||
#if SB_API_VERSION >= 15 | ||
10, 10, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to double check if they are as expected, as these values are 10 microseconds.
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #1521 +/- ##
==========================================
+ Coverage 58.55% 58.70% +0.14%
==========================================
Files 1909 1909
Lines 94580 94581 +1
==========================================
+ Hits 55385 55522 +137
+ Misses 39195 39059 -136 ☔ View full report in Codecov by Sentry. |
Change-Id: Iec338bb075e2b8298288b8bd6fd259158449d361
Change-Id: I1ad6f48753206cbcfa921a8d473322dbac9705e0
Change-Id: I4a71fed1e99f8ca1612acea02948755eca099422
Change-Id: I4c46a0f658cab8e594db01309bdeb91548607747
…ient Change-Id: Ic2a712bb8e45876b3292ab2c4e117c02855c6249
Change-Id: I693775eb45c8040d425218ba11a46e577701033e
b/299135670
Initial setup for WebMediaPlayerImpl unit test.
Currently creates an object and asserts it is empty.