зеркало из https://github.com/mozilla/gecko-dev.git
Bug 488287. When playback ends, readyState should change to HAVE_CURRENT_DATA. r=doublec,sr=roc
--HG-- extra : rebase_source : ea224af1634304c40d7e4ea0f564e72ccab65caa
This commit is contained in:
Родитель
fa85bd42db
Коммит
1bc6593cf3
|
@ -1205,6 +1205,7 @@ void nsHTMLMediaElement::NetworkError()
|
|||
void nsHTMLMediaElement::PlaybackEnded()
|
||||
{
|
||||
NS_ASSERTION(mDecoder->IsEnded(), "Decoder fired ended, but not in ended state");
|
||||
ChangeReadyState(nsIDOMHTMLMediaElement::HAVE_CURRENT_DATA);
|
||||
DispatchAsyncSimpleEvent(NS_LITERAL_STRING("ended"));
|
||||
}
|
||||
|
||||
|
|
|
@ -43,8 +43,9 @@ function playbackEnded() {
|
|||
ok(v.currentTime >= 3.9 && v.currentTime <= 4.0,
|
||||
"Checking currentTime at end: " + v.currentTime);
|
||||
ok(v.ended, "Checking playback has ended");
|
||||
ok(playingCount > 0, "Expect at least one playing event");
|
||||
playingCount = 0;
|
||||
if (endCount < 2) {
|
||||
ok(playingCount > 0, "Expect at least one playing event");
|
||||
v.currentTime = 0;
|
||||
ok(v.seeking, "Checking that seeking is now true");
|
||||
ok(!v.ended, "Checking ended is no longer set as seeking has begun");
|
||||
|
|
|
@ -43,8 +43,9 @@ function playbackEnded() {
|
|||
ok(v.currentTime >= 0.9 && v.currentTime <= 1.1,
|
||||
"Checking currentTime at end: " + v.currentTime);
|
||||
ok(v.ended, "Checking playback has ended");
|
||||
ok(playingCount > 0, "Expect at least one playing event");
|
||||
playingCount = 0;
|
||||
if (endCount < 2) {
|
||||
ok(playingCount > 0, "Expect at least one playing event");
|
||||
v.currentTime = 0;
|
||||
ok(v.seeking, "Checking that seeking is now true");
|
||||
ok(!v.ended, "Checking ended is no longer set as seeking has begun");
|
||||
|
|
|
@ -39,8 +39,9 @@ function playbackEnded() {
|
|||
ok(v.currentTime >= 3.9 && v.currentTime <= 4.0,
|
||||
"Checking currentTime at end: " + v.currentTime);
|
||||
ok(v.ended, "Checking playback has ended");
|
||||
ok(playingCount > 0, "Expect at least one playing event");
|
||||
playingCount = 0;
|
||||
if (endCount < 2) {
|
||||
ok(playingCount > 0, "Expect at least one playing event");
|
||||
v.play();
|
||||
} else {
|
||||
ok(endCount == 2, "Check playback after ended event");
|
||||
|
|
|
@ -40,8 +40,9 @@ function playbackEnded() {
|
|||
ok(v.currentTime >= 0.9 && v.currentTime <= 1.1,
|
||||
"Checking currentTime at end: " + v.currentTime);
|
||||
ok(v.ended, "Checking playback has ended");
|
||||
ok(playingCount > 0, "Expect at least one playing event");
|
||||
playingCount = 0;
|
||||
if (endCount < 2) {
|
||||
ok(playingCount > 0, "Expect at least one playing event");
|
||||
v.play();
|
||||
} else {
|
||||
ok(endCount == 2, "Check playback after ended event");
|
||||
|
|
Загрузка…
Ссылка в новой задаче