]> khamidou — GitHub mirrors - popcorn-js.git/commitdiff
[#349] Fixes unit tests by removing the exec callback when the test is complete;...
authorrwldrn <waldron.rick@gmail.com>
Thu, 17 Feb 2011 21:50:16 +0000 (16:50 -0500)
committerrwldrn <waldron.rick@gmail.com>
Thu, 17 Feb 2011 21:50:16 +0000 (16:50 -0500)
popcorn.js
test/popcorn.unit.js

index 1bd7278f54db903a304abb8ba2d91c9529beb7e4..c42a5d8c282a9fd94f650af722163236cfcab654 100644 (file)
         }
       
         this.data.events[type] = null;
+        
         return this;        
-      },      
-      special: {
-        // handles timeline controllers
-        play: function () {
-          //  renders all of the interally stored track commands
-        }
       }
     }
   };
index 5db3bb29d984228207ccd71a8632379585bf1e59..72963e0c887e07746c5082348f03c53bccf858a0 100644 (file)
@@ -182,7 +182,13 @@ test("exec", function () {
   expect(expects);
   
   function plus(){ 
-    if ( ++count == expects ) start(); 
+    if ( ++count == expects ) {
+      
+      popped.unlisten( "timeupdate", "execCallback" );
+     
+    
+      start(); 
+    }
   }
   
   stop( 10000 ); 
@@ -1480,113 +1486,3 @@ test("Last Check", function () {
   
 });
 
-/*
-
-
-  
-
-  
-
-
-test("Events Extended", function () {
-  
-  QUnit.reset();
-  
-  // needs expectation
-
-  var popped = Popcorn("#video"), 
-      expects = 11, 
-      count = 0;
-
-  expect(expects);
-  // not in full use
-  function plus(){ 
-    if ( ++count == expects ) start(); 
-  }
-  
-  stop( 10000 );  
-  
-  
-  Popcorn.plugin("extendedEvents", (function () {
-  
-    var fired = [];
-
-    var pluginObj = {
-
-      start: function() {
-
-      },
-      end: function() {
-
-      }
-    };
-    
-    $.each( Setup.events, function ( k, type ) {
-      
-      pluginObj[type]  = function (event, opts) {
-      
-        if ( fired.indexOf(type) === -1 ) {
-          fired.push(type);
-          
-          ok( true, type + " fired" );
-          
-          plus();
-        
-        
-          
-        }
-      };
-    
-    });
-    
-    return pluginObj;
-    
-  })());
-  
-  
-  
-  
-  popped.extendedEvents({
-    
-    start: 20,
-    end: 21
-    
-  });
-  
-  
-  popped.currentTime(19).play();
-  
-  $.each( Setup.events, function ( k, type ) {
-    
-    popped.trigger(type);
-      
-  });
-
-});
-*/
-
-/*
-module("Popcorn Video Object")
-test("wait()", function () {
-  
-  //QUnit.reset();
-  
-  // needs expectation
-
-  var popped = Popcorn("#video"), 
-      startat = +new Date();
-
-
-  
-  
-  popped.play().wait(2).exec(function () {
-    
-    console.log( +new Date() - startat );
-    
-    ok(true)
-    
-  }).pause();
-  
-  
-});
-*/