]> khamidou — GitHub mirrors - popcorn-js.git/commitdiff
updated unit test of image -#368
authorMinoo <minoo.ziaei@gmail.com>
Sat, 16 Apr 2011 00:19:46 +0000 (20:19 -0400)
committerMinoo <minoo.ziaei@gmail.com>
Sat, 16 Apr 2011 00:19:46 +0000 (20:19 -0400)
plugins/image/popcorn.image.unit.js

index d556067524cf2d9f04eed845009d9445a91682f6..f9102a48147fd76cdcfa53a0cfa9f38690b056a7 100644 (file)
@@ -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();  
 });