From: ScottDowne Date: Tue, 8 Mar 2011 17:30:47 +0000 (-0500) Subject: [#369] update and fixed merge conflict X-Git-Tag: v0.4~27 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=2d7a7d5c45b7d6fb00677385971026e0d9638f40;p=popcorn-js.git [#369] update and fixed merge conflict --- 2d7a7d5c45b7d6fb00677385971026e0d9638f40 diff --cc test/popcorn.unit.js index ed6b093,38ac895..e8d5882 --- a/test/popcorn.unit.js +++ b/test/popcorn.unit.js @@@ -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;