Bug 1116006 - allow 'ended' set before 'play' event fired. r=cpearce

This commit is contained in:
JW Wang 2015-01-06 01:50:00 +01:00
parent 91e5acb3af
commit 253a4057b7

View File

@ -28,7 +28,9 @@ function loaded(event) {
function started(event) {
var v = event.target;
info(v.token + ": event=" + event.type);
if (v._finished)
// For a short file, it could reach the end before 'play' received. We will
// skip the test for 'paused' would be true when ended.
if (v._finished || v.ended)
return;
ok(!v.paused, v.token + ": Video should not be paused while playing");
v.parentNode.removeChild(v);