Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1038)

Unified Diff: media/formats/webm/webm_cluster_parser_unittest.cc

Issue 2815303006: Convert MediaLog from being ref counted to owned by WebMediaPlayer. (Closed)
Patch Set: Actually fix fuzzers. Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: media/formats/webm/webm_cluster_parser_unittest.cc
diff --git a/media/formats/webm/webm_cluster_parser_unittest.cc b/media/formats/webm/webm_cluster_parser_unittest.cc
index 7a6695839ab8dd183c3774e3005e8fb8cd72cf3e..ced132eac4577745cfd8f8fc281cc45ad54cad90 100644
--- a/media/formats/webm/webm_cluster_parser_unittest.cc
+++ b/media/formats/webm/webm_cluster_parser_unittest.cc
@@ -294,9 +294,7 @@ void AppendToEnd(const StreamParser::BufferQueue& src,
class WebMClusterParserTest : public testing::Test {
public:
- WebMClusterParserTest()
- : media_log_(new StrictMock<MockMediaLog>()),
- parser_(CreateDefaultParser()) {}
+ WebMClusterParserTest() : parser_(CreateDefaultParser()) {}
protected:
void ResetParserToHaveDefaultDurations() {
@@ -326,7 +324,7 @@ class WebMClusterParserTest : public testing::Test {
kTimecodeScale, kAudioTrackNum, audio_default_duration, kVideoTrackNum,
video_default_duration, text_tracks, ignored_tracks,
audio_encryption_key_id, video_encryption_key_id, audio_codec,
- media_log_);
+ &media_log_);
}
// Create a default version of the parser for test.
@@ -365,7 +363,7 @@ class WebMClusterParserTest : public testing::Test {
video_encryption_key_id, audio_codec);
}
- scoped_refptr<StrictMock<MockMediaLog>> media_log_;
+ StrictMock<MockMediaLog> media_log_;
std::unique_ptr<WebMClusterParser> parser_;
private:
@@ -1094,7 +1092,7 @@ TEST_F(WebMClusterParserTest, ReadOpusDurationsSimpleBlockAtEndOfCluster) {
ASSERT_TRUE(VerifyBuffers(parser_, kBlockInfo, block_count));
// Fail early if any iteration fails to meet the logging expectations.
- ASSERT_TRUE(Mock::VerifyAndClearExpectations(media_log_.get()));
+ ASSERT_TRUE(Mock::VerifyAndClearExpectations(&media_log_));
loop_count++;
}
@@ -1141,7 +1139,7 @@ TEST_F(WebMClusterParserTest, PreferOpusDurationsOverBlockDurations) {
ASSERT_TRUE(VerifyBuffers(parser_, block_infos, block_count));
// Fail early if any iteration fails to meet the logging expectations.
- ASSERT_TRUE(Mock::VerifyAndClearExpectations(media_log_.get()));
+ ASSERT_TRUE(Mock::VerifyAndClearExpectations(&media_log_));
loop_count++;
}

Powered by Google App Engine
This is Rietveld 408576698