mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-04 13:07:52 +00:00
Bug 835075 - Modify the mochitest. r=padenot
This commit is contained in:
parent
84717bf861
commit
bf6ee19251
@ -652,6 +652,7 @@ void MediaDecoder::QueueMetadata(int64_t aPublishTime,
|
||||
int aChannels,
|
||||
int aRate,
|
||||
bool aHasAudio,
|
||||
bool aHasVideo,
|
||||
MetadataTags* aTags)
|
||||
{
|
||||
NS_ASSERTION(OnDecodeThread(), "Should be on decode thread.");
|
||||
|
@ -46,14 +46,19 @@ function onTimeUpdate_Video(e) {
|
||||
ok(t.mozPaintedFrames > 0, "mozPaintedFrames should be positive, is " + t.mozPaintedFrames + ".");
|
||||
ok(t.mozFrameDelay > 0, "mozFrameDelay should be positive, is " + t.mozFrameDelay + ".");
|
||||
|
||||
var source = getPlayableAudio(gPlayTests);
|
||||
if (!source) {
|
||||
todo("No audio file available.")
|
||||
SimpleTest.finish();
|
||||
if (v._firstTime) {
|
||||
t.src = t.src;
|
||||
v._firstTime = false;
|
||||
} else {
|
||||
t.removeEventListener("loadedmetadata", onLoadedMetadata_Video);
|
||||
t.addEventListener("loadedmetadata", onLoadedMetadata_Audio);
|
||||
t.src = source.name;
|
||||
var source = getPlayableAudio(gPlayTests);
|
||||
if (!source) {
|
||||
todo("No audio file available.")
|
||||
SimpleTest.finish();
|
||||
} else {
|
||||
t.removeEventListener("loadedmetadata", onLoadedMetadata_Video);
|
||||
t.addEventListener("loadedmetadata", onLoadedMetadata_Audio);
|
||||
t.src = source.name;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -66,13 +71,13 @@ function onLoadedMetadata_Video(e) {
|
||||
}
|
||||
|
||||
var v = document.getElementsByTagName("video")[0];
|
||||
v._firstTime = true;
|
||||
var source = getPlayableVideo(gPlayTests);
|
||||
if (!source) {
|
||||
todo("No video file available.");
|
||||
} else {
|
||||
v.addEventListener("loadedmetadata", onLoadedMetadata_Video);
|
||||
v.src = source.name;
|
||||
dump(source.name);
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
}
|
||||
</script>
|
||||
|
@ -108,8 +108,8 @@ public:
|
||||
|
||||
virtual bool IsMediaSeekable() MOZ_FINAL MOZ_OVERRIDE;
|
||||
|
||||
virtual void MetadataLoaded(int aChannels, int aRate, bool aHasAudio, MetadataTags* aTags) MOZ_FINAL MOZ_OVERRIDE;
|
||||
virtual void QueueMetadata(int64_t aTime, int aChannels, int aRate, bool aHasAudio, MetadataTags* aTags) MOZ_FINAL MOZ_OVERRIDE;
|
||||
virtual void MetadataLoaded(int aChannels, int aRate, bool aHasAudio, bool aHasVideo, MetadataTags* aTags) MOZ_FINAL MOZ_OVERRIDE;
|
||||
virtual void QueueMetadata(int64_t aTime, int aChannels, int aRate, bool aHasAudio, bool aHasVideo, MetadataTags* aTags) MOZ_FINAL MOZ_OVERRIDE;
|
||||
|
||||
virtual void SetMediaEndTime(int64_t aTime) MOZ_FINAL MOZ_OVERRIDE;
|
||||
|
||||
@ -251,13 +251,13 @@ BufferDecoder::IsMediaSeekable()
|
||||
}
|
||||
|
||||
void
|
||||
BufferDecoder::MetadataLoaded(int aChannels, int aRate, bool aHasAudio, MetadataTags* aTags)
|
||||
BufferDecoder::MetadataLoaded(int aChannels, int aRate, bool aHasAudio, bool aHasVideo, MetadataTags* aTags)
|
||||
{
|
||||
// ignore
|
||||
}
|
||||
|
||||
void
|
||||
BufferDecoder::QueueMetadata(int64_t aTime, int aChannels, int aRate, bool aHasAudio, MetadataTags* aTags)
|
||||
BufferDecoder::QueueMetadata(int64_t aTime, int aChannels, int aRate, bool aHasAudio, bool aHasVideo, MetadataTags* aTags)
|
||||
{
|
||||
// ignore
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user