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

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

Issue 1235793005: Deprecate LogCB in favor of using MediaLog (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments and attempt to fix Android compilation Created 5 years, 5 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
« no previous file with comments | « media/formats/webm/webm_tracks_parser.cc ('k') | media/formats/webm/webm_video_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/formats/webm/webm_tracks_parser_unittest.cc
diff --git a/media/formats/webm/webm_tracks_parser_unittest.cc b/media/formats/webm/webm_tracks_parser_unittest.cc
index 2f85ddc5e76acf6ef71076b40ff828e20b6d8c1e..39854ef00dc5b09d3f5b9d5f458511f6554d2b5b 100644
--- a/media/formats/webm/webm_tracks_parser_unittest.cc
+++ b/media/formats/webm/webm_tracks_parser_unittest.cc
@@ -29,7 +29,8 @@ static void VerifyTextTrackInfo(const uint8* buffer,
TextKind text_kind,
const std::string& name,
const std::string& language) {
- scoped_ptr<WebMTracksParser> parser(new WebMTracksParser(LogCB(), false));
+ scoped_ptr<WebMTracksParser> parser(
+ new WebMTracksParser(new MediaLog(), false));
int result = parser->Parse(buffer, buffer_size);
EXPECT_GT(result, 0);
@@ -95,7 +96,8 @@ TEST_F(WebMTracksParserTest, IgnoringTextTracks) {
tb.AddTextTrack(2, 2, kWebMCodecSubtitles, "Commentary", "fre");
const std::vector<uint8> buf = tb.Finish();
- scoped_ptr<WebMTracksParser> parser(new WebMTracksParser(LogCB(), true));
+ scoped_ptr<WebMTracksParser> parser(
+ new WebMTracksParser(new MediaLog(), true));
int result = parser->Parse(&buf[0], buf.size());
EXPECT_GT(result, 0);
@@ -108,7 +110,7 @@ TEST_F(WebMTracksParserTest, IgnoringTextTracks) {
EXPECT_TRUE(ignored_tracks.find(2) != ignored_tracks.end());
// Test again w/o ignoring the test tracks.
- parser.reset(new WebMTracksParser(LogCB(), false));
+ parser.reset(new WebMTracksParser(new MediaLog(), false));
result = parser->Parse(&buf[0], buf.size());
EXPECT_GT(result, 0);
@@ -128,7 +130,8 @@ TEST_F(WebMTracksParserTest, AudioVideoDefaultDurationUnset) {
tb.AddVideoTrack(2, 2, "V_VP8", "video", "", -1, 320, 240);
const std::vector<uint8> buf = tb.Finish();
- scoped_ptr<WebMTracksParser> parser(new WebMTracksParser(LogCB(), true));
+ scoped_ptr<WebMTracksParser> parser(
+ new WebMTracksParser(new MediaLog(), true));
int result = parser->Parse(&buf[0], buf.size());
EXPECT_LE(0, result);
EXPECT_EQ(static_cast<int>(buf.size()), result);
@@ -157,7 +160,8 @@ TEST_F(WebMTracksParserTest, AudioVideoDefaultDurationSet) {
tb.AddVideoTrack(2, 2, "V_VP8", "video", "", 987654321, 320, 240);
const std::vector<uint8> buf = tb.Finish();
- scoped_ptr<WebMTracksParser> parser(new WebMTracksParser(LogCB(), true));
+ scoped_ptr<WebMTracksParser> parser(
+ new WebMTracksParser(new MediaLog(), true));
int result = parser->Parse(&buf[0], buf.size());
EXPECT_LE(0, result);
EXPECT_EQ(static_cast<int>(buf.size()), result);
@@ -179,7 +183,8 @@ TEST_F(WebMTracksParserTest, InvalidZeroDefaultDurationSet) {
tb.AddAudioTrack(1, 1, "A_VORBIS", "audio", "", 0, 2, 8000);
const std::vector<uint8> buf = tb.Finish();
- scoped_ptr<WebMTracksParser> parser(new WebMTracksParser(LogCB(), true));
+ scoped_ptr<WebMTracksParser> parser(
+ new WebMTracksParser(new MediaLog(), true));
EXPECT_EQ(-1, parser->Parse(&buf[0], buf.size()));
}
@@ -190,7 +195,8 @@ TEST_F(WebMTracksParserTest, HighTrackUID) {
tb.AddAudioTrack(1, 1ULL << 31, "A_VORBIS", "audio", "", 40, 2, 8000);
const std::vector<uint8> buf = tb.Finish();
- scoped_ptr<WebMTracksParser> parser(new WebMTracksParser(LogCB(), true));
+ scoped_ptr<WebMTracksParser> parser(
+ new WebMTracksParser(new MediaLog(), true));
EXPECT_GT(parser->Parse(&buf[0], buf.size()),0);
}
« no previous file with comments | « media/formats/webm/webm_tracks_parser.cc ('k') | media/formats/webm/webm_video_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698