From: Rick Waldron Date: Wed, 15 Jun 2011 18:36:59 +0000 (-0400) Subject: [#574] Fixes target attribute ref; Adds test X-Git-Tag: v0.7^2~37^2 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=280d7ec9b07e3bdcff03dd3ee822b2995d50d4d1;p=popcorn-js.git [#574] Fixes target attribute ref; Adds test --- diff --git a/plugins/attribution/popcorn.attribution.js b/plugins/attribution/popcorn.attribution.js index 0f8e81e..72174b6 100644 --- a/plugins/attribution/popcorn.attribution.js +++ b/plugins/attribution/popcorn.attribution.js @@ -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" ); diff --git a/plugins/attribution/popcorn.attribution.unit.js b/plugins/attribution/popcorn.attribution.unit.js index bb5bb16..7b1d3cd 100644 --- a/plugins/attribution/popcorn.attribution.unit.js +++ b/plugins/attribution/popcorn.attribution.unit.js @@ -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(); });