From: Christopher De Cairos Date: Mon, 29 Aug 2011 15:54:57 +0000 (-0400) Subject: fix styling and whitespace. X-Git-Tag: v0.8^2~3^2 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=9334fd6faab56d0648f3996e7d97fb0359673cab;p=popcorn-js.git fix styling and whitespace. --- diff --git a/plugins/webpage/popcorn.webpage.unit.js b/plugins/webpage/popcorn.webpage.unit.js index 2937f46..803e6a1 100755 --- a/plugins/webpage/popcorn.webpage.unit.js +++ b/plugins/webpage/popcorn.webpage.unit.js @@ -1,22 +1,22 @@ -test("Popcorn Webpage Plugin", function () { +test( "Popcorn Webpage Plugin", function() { - var popped = Popcorn("#video"), + var popped = Popcorn( "#video" ), expects = 11, count = 0, setupId, - theiFrame = document.getElementsByTagName("iframe"); + theiFrame = document.getElementsByTagName( "iframe" ); - expect(expects); + expect( expects ); function plus() { - if ( ++count===expects) { + if ( ++count === expects ) { start(); } } stop(); - ok ("webpage" in popped, "webpages is a mehtod of the popped instance"); + ok( "webpage" in popped, "webpages is a mehtod of the popped instance" ); plus(); equal( theiFrame.length, 0, "initially, there is no iframes on the page" ); @@ -24,48 +24,48 @@ test("Popcorn Webpage Plugin", function () { popped.webpage({ id: "webpages-a", - start: 0, // seconds - end: 1, // seconds + start: 0, + end: 1, src: "http://webmademovies.org", target: "webpagediv" }) .webpage({ id: "webpages-b", - start: 1, // seconds - end: 2, // seconds + start: 1, + end: 2, src: "http://zenit.senecac.on.ca/wiki/index.php/Processing.js", target: "webpagediv" }) - .volume(0); + .volume( 0 ); setupId = popped.getLastTrackEventId(); popped.exec( 0, function() { - ok (!!theiFrame[0], "iframe was created" ); + ok( !!theiFrame[ 0 ], "iframe was created" ); plus(); equal( theiFrame.length, 2, "there is only two iframes on the page" ); plus(); - equal( theiFrame[0].id, "webpages-a", "the first iframe has the id 'webpages-a'" ); + equal( theiFrame[ 0 ].id, "webpages-a", "the first iframe has the id 'webpages-a'" ); plus(); - ok( /webmademovies/.test(theiFrame[0].src), "iframe has the src 'http://webmademovies.org/'" ); + ok( /webmademovies/.test( theiFrame[ 0 ].src ), "iframe has the src 'http://webmademovies.org/'" ); plus(); }); popped.exec( 1, function() { - ok (!!theiFrame[1], "iframe was created" ); + ok( !!theiFrame[ 1 ], "iframe was created" ); plus(); - equal( theiFrame[1].id, "webpages-b", "iframe second has the id 'webpages-b'" ); + equal( theiFrame[ 1 ].id, "webpages-b", "iframe second has the id 'webpages-b'" ); plus(); - equal( theiFrame[1].src,"http://zenit.senecac.on.ca/wiki/index.php/Processing.js", "iframe has the src 'http://zenit.senecac.on.ca/wiki/index.php/Processing.js'" ); + equal( theiFrame[ 1 ].src, "http://zenit.senecac.on.ca/wiki/index.php/Processing.js", "iframe has the src 'http://zenit.senecac.on.ca/wiki/index.php/Processing.js'" ); plus(); }); popped.exec( 2, function() { - ok (theiFrame[0].style.display === "none" && theiFrame[1].style.display === "none", "both iframes are hidden" ); + ok (theiFrame[ 0 ].style.display === "none" && theiFrame[ 1 ].style.display === "none", "both iframes are hidden" ); plus(); popped.pause().removeTrackEvent( setupId ); - ok( !theiFrame[1], "removed webpage was properly destroyed" ); + ok( !theiFrame[ 1 ], "removed webpage was properly destroyed" ); plus(); });