From: Minoo Date: Sat, 16 Apr 2011 00:19:46 +0000 (-0400) Subject: updated unit test of image -#368 X-Git-Tag: v0.5~15^2~3 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=0842d8c6dfb69f666c1fe6cc0c90f5e49f8c937a;p=popcorn-js.git updated unit test of image -#368 --- diff --git a/plugins/image/popcorn.image.unit.js b/plugins/image/popcorn.image.unit.js index d556067..f9102a4 100644 --- a/plugins/image/popcorn.image.unit.js +++ b/plugins/image/popcorn.image.unit.js @@ -3,8 +3,6 @@ test("Popcorn Image Plugin", function () { var popped = Popcorn("#video"), expects = 5, count = 0, - interval, - interval2, imagediv = document.getElementById('imagediv'); expect( expects ); @@ -30,24 +28,19 @@ test("Popcorn Image Plugin", function () { src: 'https://www.drumbeat.org/media//images/drumbeat-logo-splash.png', text: 'DRUMBEAT', target: 'imagediv' - } ); + }); popped.exec( 2, function() { - if( popped.currentTime() > 1 && popped.currentTime() < 3 ) { ok( /display: block;/.test( imagediv.innerHTML ), "Div contents are displayed" ); plus(); ok( /img/.test( imagediv.innerHTML ), "An image exists" ); plus(); - } }); popped.exec( 4, function() { - if( popped.currentTime() > 3 ) { ok( /display: none;/.test( imagediv.innerHTML ), "Div contents are hidden again" ); plus(); - } }); + popped.volume(0).play(); - popped.volume(0); - popped.play(); });