From 0842d8c6dfb69f666c1fe6cc0c90f5e49f8c937a Mon Sep 17 00:00:00 2001 From: Minoo Date: Fri, 15 Apr 2011 20:19:46 -0400 Subject: [PATCH] updated unit test of image -#368 --- plugins/image/popcorn.image.unit.js | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) 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(); }); -- 2.43.0