summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorwolenetz@chromium.org <wolenetz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-17 19:55:45 +0000
committerwolenetz@chromium.org <wolenetz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-17 19:55:45 +0000
commite023124fce83e2df4a93c503ebf4c7447b6bd39b (patch)
tree930c0342c67e49d97443559f4ba5e8479d36b244 /media
parent8299b71930788827e96fe89a018c4ad825cd4ff7 (diff)
downloadchromium_src-e023124fce83e2df4a93c503ebf4c7447b6bd39b.zip
chromium_src-e023124fce83e2df4a93c503ebf4c7447b6bd39b.tar.gz
chromium_src-e023124fce83e2df4a93c503ebf4c7447b6bd39b.tar.bz2
Setup DemuxerReady duration_ms parameter in MSP unittests
Should fix bug 260868, to be confirmed once fyi bot cycles green. BUG=260868 R=qinmin@chromium.org,acolwell@chromium.org TEST=media_unittests suite passes locally on Nexus 4 Review URL: https://chromiumcodereview.appspot.com/19423003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@212117 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media')
-rw-r--r--media/base/android/media_source_player_unittest.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/media/base/android/media_source_player_unittest.cc b/media/base/android/media_source_player_unittest.cc
index 359e095..65318bc 100644
--- a/media/base/android/media_source_player_unittest.cc
+++ b/media/base/android/media_source_player_unittest.cc
@@ -16,6 +16,8 @@
namespace media {
+static const int kDefaultDurationInMs = 10000;
+
// Mock of MediaPlayerManager for testing purpose
class MockMediaPlayerManager : public MediaPlayerManager {
public:
@@ -104,6 +106,7 @@ class MediaSourcePlayerTest : public testing::Test {
params.audio_channels = 2;
params.audio_sampling_rate = 44100;
params.is_audio_encrypted = false;
+ params.duration_ms = kDefaultDurationInMs;
scoped_refptr<DecoderBuffer> buffer = ReadTestDataFile("vorbis-extradata");
params.audio_extra_data = std::vector<uint8>(
buffer->GetData(),
@@ -116,6 +119,7 @@ class MediaSourcePlayerTest : public testing::Test {
params.video_codec = kCodecVP8;
params.video_size = gfx::Size(320, 240);
params.is_video_encrypted = false;
+ params.duration_ms = kDefaultDurationInMs;
Start(params);
}
@@ -186,6 +190,7 @@ TEST_F(MediaSourcePlayerTest, StartAudioDecoderWithInvalidConfig) {
params.audio_channels = 2;
params.audio_sampling_rate = 44100;
params.is_audio_encrypted = false;
+ params.duration_ms = kDefaultDurationInMs;
uint8 invalid_codec_data[] = { 0x00, 0xff, 0xff, 0xff, 0xff };
params.audio_extra_data.insert(params.audio_extra_data.begin(),
invalid_codec_data, invalid_codec_data + 4);
@@ -290,6 +295,7 @@ TEST_F(MediaSourcePlayerTest, StartAfterSeekFinish) {
params.audio_channels = 2;
params.audio_sampling_rate = 44100;
params.is_audio_encrypted = false;
+ params.duration_ms = kDefaultDurationInMs;
player_->DemuxerReady(params);
EXPECT_EQ(NULL, GetMediaDecoderJob(true));
EXPECT_EQ(0, manager_->num_requests());
@@ -360,6 +366,7 @@ TEST_F(MediaSourcePlayerTest, DecoderJobsCannotStartWithoutAudio) {
params.video_codec = kCodecVP8;
params.video_size = gfx::Size(320, 240);
params.is_video_encrypted = false;
+ params.duration_ms = kDefaultDurationInMs;
Start(params);
EXPECT_EQ(0, manager_->num_requests());