]> khamidou — GitHub mirrors - popcorn-js.git/commitdiff
changes made as per PR recommendations branch:footnotePlugin [#167 responsible:Rick]
authorAnna Sobiepanek <annaopensource@gmail.com>
Fri, 10 Dec 2010 22:03:32 +0000 (17:03 -0500)
committerAnna Sobiepanek <annaopensource@gmail.com>
Fri, 10 Dec 2010 22:03:32 +0000 (17:03 -0500)
plugins/footnote/popcorn.footnote.unit.js

index 12fe5e32cc30250576b9572ceebbf38ab24b3afb..c685888e1ff5675e75ac63cf2874f79a27352c38 100644 (file)
@@ -3,10 +3,10 @@ test("Popcorn Footnote Plugin", function () {
   var popped = Popcorn("#video"),
       expects = 5, 
       count = 0,
-      iframeInterval,
-      iframeInterval2,
-      iframeInterval3,
-      iframeInterval4;
+      interval,
+      interval2,
+      interval3,
+      footnotediv = document.getElementById('footnotediv');
   
   expect(expects);
   
@@ -21,7 +21,7 @@ test("Popcorn Footnote Plugin", function () {
   ok ('footnote' in popped, "footnote is a mehtod of the popped instance");
   plus();
   
-  ok ( document.getElementById('footnotediv').innerHTML === "", "initially, there is nothing inside the footnotediv" );
+  equals ( footnotediv.innerHTML, "", "initially, there is nothing inside the footnotediv" );
   plus();
   
   popped.footnote({
@@ -41,7 +41,7 @@ test("Popcorn Footnote Plugin", function () {
   
   interval = setInterval( function() {
     if( popped.currentTime() > 5 && popped.currentTime() <= 15 ) {
-      ok (document.getElementById('footnotediv').innerHTML === "This video made exclusively for drumbeat.org", "footnote displaing correct information" );
+      equals (footnotediv.innerHTML , "This video made exclusively for drumbeat.org", "footnote displaing correct information" );
       plus();
       clearInterval( interval );
     }
@@ -49,7 +49,7 @@ test("Popcorn Footnote Plugin", function () {
   
   interval2 = setInterval( function() {
     if( popped.currentTime() > 15 && popped.currentTime() < 35  ) {
-      ok (document.getElementById('footnotediv').innerHTML === "", "footnote cleared properly" );
+      equals (footnotediv.innerHTML , "", "footnote cleared properly" );
       plus();
       clearInterval( interval2 );
     }
@@ -57,7 +57,7 @@ test("Popcorn Footnote Plugin", function () {
   
   interval3 = setInterval( function() {
     if( popped.currentTime() > 35 && popped.currentTime() < 45 ) {
-      ok (document.getElementById('footnotediv').innerHTML === "Visit webmademovies.org for more details", "footnote displaing correct information" );
+      equals (footnotediv.innerHTML ,"Visit webmademovies.org for more details", "footnote displaing correct information" );
       plus();
       clearInterval( interval3 );
     }