Fix failing Core test for FX 3.6 [#773]

This commit is contained in:
Christopher De Cairos 2012-03-02 15:38:03 -05:00
Родитель 16bc3e4d0c 095f37c43a
Коммит 9d7396ce15
1 изменённых файлов: 11 добавлений и 8 удалений

Просмотреть файл

@ -867,27 +867,30 @@ test( "play(n)/pause(n) as shorthand to currentTime(n).play()/pause()", function
}
}
stop( 1000 );
stop( 10000 );
function poll() {
if ( $pop.media.readyState >= 2 ) {
// this should trigger immediately
var firstSeekedEvent = function() {
// IE9 has weird seek behaviour... this works around it
$pop.listen( "seeked", function() {
$pop.unlisten( "seeked" );
$pop.unlisten( "seeked", firstSeekedEvent );
equal( Math.round( $pop.currentTime() ), 10, "play(n) sets currentTime to 10" );
plus();
$pop.listen( "seeked", secondSeekedEvent );
$pop.pause( 5 );
},
secondSeekedEvent = function() {
$pop.unlisten( "seeked", secondSeekedEvent );
equal( Math.round( $pop.currentTime() ), 5, "pause(n) sets currentTime to 5" );
plus();
});
};
$pop.listen( "seeked", firstSeekedEvent );
$pop.play( 10 ).pause();
} else {
setTimeout( poll, 10 );
}