Index: media/capture/webm_muxer_unittest.cc |
diff --git a/media/capture/webm_muxer_unittest.cc b/media/capture/webm_muxer_unittest.cc |
index 7e162fa0a676b0422cb17b88956486dd6de22e7c..bac4e61e65a158a203b8b9f91c1ce08e451a74c1 100644 |
--- a/media/capture/webm_muxer_unittest.cc |
+++ b/media/capture/webm_muxer_unittest.cc |
@@ -15,15 +15,18 @@ |
using ::testing::_; |
using ::testing::AtLeast; |
using ::testing::Mock; |
+using ::testing::TestWithParam; |
+using ::testing::Values; |
using ::testing::WithArgs; |
namespace media { |
-class WebmMuxerTest : public testing::Test { |
+class WebmMuxerTest : public TestWithParam<bool> { |
public: |
WebmMuxerTest() |
- : webm_muxer_(base::Bind(&WebmMuxerTest::WriteCallback, |
- base::Unretained(this))), |
+ : webm_muxer_( |
+ GetParam() /* use_vp9 */, |
+ base::Bind(&WebmMuxerTest::WriteCallback, base::Unretained(this))), |
last_encoded_length_(0), |
accumulated_position_(0) { |
EXPECT_EQ(webm_muxer_.Position(), 0); |
@@ -62,7 +65,7 @@ class WebmMuxerTest : public testing::Test { |
// Checks that the WriteCallback is called with appropriate params when |
// WebmMuxer::Write() method is called. |
-TEST_F(WebmMuxerTest, Write) { |
+TEST_P(WebmMuxerTest, Write) { |
const base::StringPiece encoded_data("abcdefghijklmnopqrstuvwxyz"); |
EXPECT_CALL(*this, WriteCallback(encoded_data)); |
@@ -73,7 +76,7 @@ TEST_F(WebmMuxerTest, Write) { |
// This test sends two frames and checks that the WriteCallback is called with |
// appropriate params in both cases. |
-TEST_F(WebmMuxerTest, OnEncodedVideoTwoFrames) { |
+TEST_P(WebmMuxerTest, OnEncodedVideoTwoFrames) { |
const gfx::Size frame_size(160, 80); |
const scoped_refptr<VideoFrame> video_frame = |
VideoFrame::CreateBlackFrame(frame_size); |
@@ -115,4 +118,6 @@ TEST_F(WebmMuxerTest, OnEncodedVideoTwoFrames) { |
accumulated_position_); |
} |
+INSTANTIATE_TEST_CASE_P(, WebmMuxerTest, Values(false, true)); |
+ |
} // namespace media |