From: David Seifried Date: Wed, 15 Jun 2011 19:24:29 +0000 (-0400) Subject: [#569] Added unit tests for added functionality, also initialized variable the create... X-Git-Tag: v0.7^2~38^2 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=a8627785ec8553abaae53809b949aa86b9a89615;p=popcorn-js.git [#569] Added unit tests for added functionality, also initialized variable the created variable to false as thats what it should be --- diff --git a/players/youtube/popcorn.youtube.js b/players/youtube/popcorn.youtube.js index 82394b5..8eb3485 100644 --- a/players/youtube/popcorn.youtube.js +++ b/players/youtube/popcorn.youtube.js @@ -175,7 +175,7 @@ var onYouTubePlayerReady; this.loadStarted = false; this.loadedData = false; this.fullyLoaded = false; - this.paused = true; + this.paused = false; // If supplied as number, append 'px' on end // If suppliied as '###' or '###px', convert to number and append 'px' back on end diff --git a/players/youtube/popcorn.youtube.unit.js b/players/youtube/popcorn.youtube.unit.js index b79d2be..c3b0543 100644 --- a/players/youtube/popcorn.youtube.unit.js +++ b/players/youtube/popcorn.youtube.unit.js @@ -33,7 +33,7 @@ test( "Popcorn YouTube Plugin Event Tests", function() { set1Executed = false, set2Executed = false, set3Executed = false, - expects = expectedEvents.length + 5, + expects = expectedEvents.length + 6, listeners = []; stop( 15000 ); @@ -45,6 +45,8 @@ test( "Popcorn YouTube Plugin Event Tests", function() { popcorn.exec(2, function() { ok( popcorn.currentTime() >= 2, "Check time synchronization." ); plus(); + ok( popcorn.video.paused == false, "Video is not paused" ); + plus(); }); popcorn.exec(49, function() { ok( popcorn.currentTime() >= 49, "Check time synchronization." );