forked from mozilla/gecko-dev
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1342913: P1. Add mochitest. r=gerald
MozReview-Commit-ID: IaU4tIm0Wze --HG-- extra : rebase_source : 99c48155ec1c846496767ed2f823c60811e968f6
- Loading branch information
Jean-Yves Avenard
committed
Mar 7, 2017
1 parent
ec56929
commit 65f007b
Showing
2 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
dom/media/mediasource/test/test_ChangeWhileWaitingOnMissingData_mp4.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<!DOCTYPE html> | ||
<html><head> | ||
<meta http-equiv="content-type" content="text/html; charset=windows-1252"> | ||
<title>MSE: resume from waiting even after format change occurred</title> | ||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> | ||
<script type="text/javascript" src="mediasource.js"></script> | ||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> | ||
</head> | ||
<body> | ||
<pre id="test"><script class="testbody" type="text/javascript"> | ||
|
||
SimpleTest.waitForExplicitFinish(); | ||
|
||
runWithMSE(function(ms, el) { | ||
el.controls = true; | ||
once(ms, 'sourceopen').then(function() { | ||
ok(true, "Receive a sourceopen event"); | ||
var sb = ms.addSourceBuffer("video/mp4"); | ||
fetchAndLoad(sb, 'bipbop/bipbop_480_624kbps-video', ['init'], '.mp4') | ||
.then(fetchAndLoad.bind(null, sb, 'bipbop/bipbop_480_624kbps-video', range(1, 3), '.m4s')) | ||
.then(function() { | ||
el.play(); | ||
// let seek to the last audio frame. | ||
// The seek will complete and then playback will stall. | ||
el.currentTime = 1.532517; | ||
return Promise.all([once(el, 'seeked'), once(el, 'stalled')]); | ||
}) | ||
.then(function() { | ||
info("seek completed"); | ||
return fetchAndLoad(sb, 'bipbop/bipbop', ['init'], '.mp4'); | ||
}) | ||
.then(fetchAndLoad.bind(null, sb, 'bipbop/bipbop', range(1, 4), '.m4s')) | ||
.then(function() { | ||
ms.endOfStream(); | ||
return once(el, 'ended'); | ||
}).then(function() { | ||
SimpleTest.finish(); | ||
}); | ||
}); | ||
}); | ||
|
||
</script> | ||
</pre> | ||
</body> | ||
</html> |