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;