From a8627785ec8553abaae53809b949aa86b9a89615 Mon Sep 17 00:00:00 2001 From: David Seifried Date: Wed, 15 Jun 2011 15:24:29 -0400 Subject: [PATCH] [#569] Added unit tests for added functionality, also initialized variable the created variable to false as thats what it should be --- players/youtube/popcorn.youtube.js | 2 +- players/youtube/popcorn.youtube.unit.js | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) 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." ); -- 2.43.0