]> khamidou — GitHub mirrors - popcorn-js.git/commitdiff
[#369] update and fixed merge conflict
authorScottDowne <sdowne@learn.senecac.on.ca>
Tue, 8 Mar 2011 17:30:47 +0000 (12:30 -0500)
committerScottDowne <sdowne@learn.senecac.on.ca>
Tue, 8 Mar 2011 17:30:47 +0000 (12:30 -0500)
1  2 
popcorn.js
test/popcorn.unit.js

diff --cc popcorn.js
Simple merge
index ed6b09344917dbc419e134958b844f36fb5df0dc,38ac895cf2b985732bc0270bcb4edb9d5c9b758f..e8d58823af64b0fe8d646604a4b09121ec12d27c
@@@ -745,6 -756,29 +756,61 @@@ test("Plugin Breaker", function () 
      end: 2
    });     
  
+   popped.currentTime(0).play();
+ 
+ });
+ 
++test("Plugin Empty", function () {
++  
++  QUnit.reset();
++
++  var popped = Popcorn("#video"), 
++      expects = 2,
++      testObj = {},
++      count = 0;
++
++  function plus() { 
++    if ( ++count == expects ) {
++      Popcorn.removePlugin("empty");
++      start();
++    }
++  }
++
++  expect( expects );
++  stop( 10000 );
++
++  Popcorn.plugin("empty", testObj);
++
++  popped.empty({});
++
++  ok( testObj.start, "default start function is generated" );
++  plus();
++  ok( testObj.end, "default end function is generated" );
++  plus();
++
++  popped.currentTime(0).play();
++
++});
++
+ test("Plugin Closure", function () {
+   
+   QUnit.reset();
+ 
+   var popped = Popcorn("#video"), 
+       methods = "load play pause currentTime mute volume roundTime exec removePlugin",
+       expects = 8, 
+       count = 0;
+ 
+   function plus() { 
+     if ( ++count == expects ) {
+       Popcorn.removePlugin("closure");
+       start();
+     }
+   }
+ 
+   expect( expects );
+   stop( 10000 );
+ 
    Popcorn.plugin("closure", function() {
  
      var startCount = 0;