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

Unified Diff: media/mp4/mp4_stream_parser_unittest.cc

Issue 11313016: Add "type" in GenerateKeyRequest() and OnNeedKey(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments resolved Created 8 years, 2 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/mp4/mp4_stream_parser.cc ('k') | media/webm/webm_stream_parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/mp4/mp4_stream_parser_unittest.cc
diff --git a/media/mp4/mp4_stream_parser_unittest.cc b/media/mp4/mp4_stream_parser_unittest.cc
index 6d7221a9c5e6b7c93664db280b0da6da5198cc26..81dbdd88a75dcc88b9a392d9261a72286db1dc4c 100644
--- a/media/mp4/mp4_stream_parser_unittest.cc
+++ b/media/mp4/mp4_stream_parser_unittest.cc
@@ -23,6 +23,9 @@ using base::TimeDelta;
namespace media {
namespace mp4 {
+// TODO(xhwang): Figure out the init data type appropriately once it's spec'ed.
+static const char kMp4InitDataType[] = "video/mp4";
+
class MP4StreamParserTest : public testing::Test {
public:
MP4StreamParserTest()
@@ -54,7 +57,7 @@ class MP4StreamParserTest : public testing::Test {
void InitF(bool init_ok, base::TimeDelta duration) {
DVLOG(1) << "InitF: ok=" << init_ok
- << ", dur=" << duration.InMilliseconds();
+ << ", dur=" << duration.InMilliseconds();
ddorwin 2012/10/27 03:26:00 nit: space replacement, but still off
xhwang 2012/10/27 05:32:52 On my local linux bot this looks aligned (no tab).
}
bool NewConfigF(const AudioDecoderConfig& ac, const VideoDecoderConfig& vc) {
@@ -76,8 +79,12 @@ class MP4StreamParserTest : public testing::Test {
return true;
}
- bool KeyNeededF(scoped_array<uint8> init_data, int init_data_size) {
+ bool KeyNeededF(const std::string& type,
+ scoped_array<uint8> init_data, int init_data_size) {
DVLOG(1) << "KeyNeededF: " << init_data_size;
+ EXPECT_EQ(kMp4InitDataType, type);
+ EXPECT_TRUE(init_data.get());
+ EXPECT_GT(init_data_size, 0);
return true;
}
« no previous file with comments | « media/mp4/mp4_stream_parser.cc ('k') | media/webm/webm_stream_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698