]> khamidou — GitHub mirrors - popcorn-js.git/commitdiff
[#574] Fixes target attribute ref; Adds test
authorRick Waldron <waldron.rick@gmail.com>
Wed, 15 Jun 2011 18:36:59 +0000 (14:36 -0400)
committerRick Waldron <waldron.rick@gmail.com>
Wed, 15 Jun 2011 18:36:59 +0000 (14:36 -0400)
plugins/attribution/popcorn.attribution.js
plugins/attribution/popcorn.attribution.unit.js

index 0f8e81e3f230ad334163ead6692cdc175d7d826b..72174b6919d7b1bab0cd2a18a3c3c3c098b5be8b 100644 (file)
@@ -65,7 +65,7 @@
 
         var attrib = "", 
         license = licenses[ options.license.toLowerCase() ], 
-        tar = "" + tar + ""; 
+        tar = "target=_blank"; 
 
         // make a div to put the information into
         options._container = document.createElement( "div" );
index bb5bb16623ce962648f87a7f3d0a9dae4b30b31a..7b1d3cdd020e46de515d58fd843332a6ac6aa309 100644 (file)
@@ -1,7 +1,7 @@
 test("Popcorn attribution Plugin", function () {
   
   var popped = Popcorn("#video"),
-      expects = 8, 
+      expects = 9, 
       count = 0,
       setupId,
       attributiondiv = document.getElementById('attribdiv');
@@ -54,6 +54,10 @@ test("Popcorn attribution Plugin", function () {
   });
   
   popped.exec( 0.5, function() {
+
+    ok( /target="_blank"/.test( attributiondiv.innerHTML ), "attributions create anchors that target=_blank" );
+    plus();
+
     equals (attributiondiv.children[1].style.display , "inline", "second attribution is visible on the page" );
     plus();
   });