зеркало из https://github.com/mozilla/popcorn-js.git
Rename Qunit.equals() to Qunit.equal() for non-core tests [#231]
This commit is contained in:
Родитель
4196910fca
Коммит
29e4984eaa
|
@ -241,7 +241,7 @@ test( "Popcorn.smart player selector", function() {
|
|||
plus();
|
||||
ok( Popcorn.spartaPlayer.canPlayType( "unsupported element", "this is sparta" ) === false, "canPlayType method fails on invalid container!" );
|
||||
plus();
|
||||
equals( Popcorn.smart( "#video", "this is sparta" ).media.nodeName, "DIV", "A player was found for this URL" );
|
||||
equal( Popcorn.smart( "#video", "this is sparta" ).media.nodeName, "DIV", "A player was found for this URL" );
|
||||
plus();
|
||||
|
||||
// not matching url to player returns false
|
||||
|
@ -260,7 +260,7 @@ test( "Popcorn.smart player selector", function() {
|
|||
}
|
||||
});
|
||||
|
||||
equals( thisIsNotSparta.media.nodeName, "VIDEO", "no player was found for this URL, default to video element" );
|
||||
equal( thisIsNotSparta.media.nodeName, "VIDEO", "no player was found for this URL, default to video element" );
|
||||
plus();
|
||||
|
||||
// no existing canPlayType function returns undefined
|
||||
|
@ -295,9 +295,9 @@ test( "Popcorn.smart player selector", function() {
|
|||
}
|
||||
}).destroy();
|
||||
|
||||
equals( loaded, true, "canPlayType passed on a valid type" );
|
||||
equal( loaded, true, "canPlayType passed on a valid type" );
|
||||
plus();
|
||||
equals( error, true, "canPlayType failed on an invalid type" );
|
||||
equal( error, true, "canPlayType failed on an invalid type" );
|
||||
plus();
|
||||
|
||||
});
|
||||
|
|
|
@ -61,17 +61,17 @@
|
|||
stop();
|
||||
|
||||
p.exec( 3, function() {
|
||||
equals( startCalled, 5, "start was called 5 times from the parsed data" );
|
||||
equal( startCalled, 5, "start was called 5 times from the parsed data" );
|
||||
plus();
|
||||
p.currentTime( 9 );
|
||||
});
|
||||
|
||||
p.exec( 10.5, function() {
|
||||
equals( endCalled, 5, "end was called 5 times from the parsed data" );
|
||||
equal( endCalled, 5, "end was called 5 times from the parsed data" );
|
||||
plus()
|
||||
});
|
||||
|
||||
equals( setupCalled, 5, "setup was called 5 times from the parsed data" );
|
||||
equal( setupCalled, 5, "setup was called 5 times from the parsed data" );
|
||||
plus();
|
||||
|
||||
});
|
||||
|
|
|
@ -33,7 +33,7 @@ test( "Popcorn 0.3 JSON Parser Plugin", function () {
|
|||
|
||||
Popcorn.forEach( data.json.data, function ( dataObj ) {
|
||||
Popcorn.forEach( dataObj, function ( obj, key ) {
|
||||
equals( trackData.history[ idx ].indexOf( key ), 0, "history item '" + trackData.history[ idx ] + "' matches data key '"+ key + "' at correct index" );
|
||||
equal( trackData.history[ idx ].indexOf( key ), 0, "history item '" + trackData.history[ idx ] + "' matches data key '"+ key + "' at correct index" );
|
||||
plus();
|
||||
idx++;
|
||||
});
|
||||
|
@ -45,13 +45,13 @@ test( "Popcorn 0.3 JSON Parser Plugin", function () {
|
|||
if ( !finished ) {
|
||||
finished = true;
|
||||
|
||||
equals( trackEvents.byStart.length, numLoadingEvents + 3 , "trackEvents.byStart.length === (5 loaded, 2 padding) " );
|
||||
equal( trackEvents.byStart.length, numLoadingEvents + 3 , "trackEvents.byStart.length === (5 loaded, 2 padding) " );
|
||||
plus();
|
||||
equals( $("#video-iframe-container").children().length, 2, '$("#video-iframe-container").children().length' );
|
||||
equal( $("#video-iframe-container").children().length, 2, '$("#video-iframe-container").children().length' );
|
||||
plus();
|
||||
equals( $("#video-map-container").children().length, 1, '$("#video-map-container").children().length' );
|
||||
equal( $("#video-map-container").children().length, 1, '$("#video-map-container").children().length' );
|
||||
plus();
|
||||
equals( $("#video-footnote-container").children().length, 2, '$("#video-footnote-container").children().length' );
|
||||
equal( $("#video-footnote-container").children().length, 2, '$("#video-footnote-container").children().length' );
|
||||
plus();
|
||||
|
||||
this.pause();
|
||||
|
|
|
@ -36,16 +36,16 @@ test( "Popcorn 0.3 SBV Parser Plugin", function () {
|
|||
if( evt._natives.type === "subtitle" ) {
|
||||
sub = subs[ numSubs++ ];
|
||||
|
||||
equals( evt.start, sub.start, "Correctly parsed start of " + evt.start );
|
||||
equal( evt.start, sub.start, "Correctly parsed start of " + evt.start );
|
||||
plus();
|
||||
equals( evt.text, sub.text, "Correctly parsed text of " + evt.start );
|
||||
equal( evt.text, sub.text, "Correctly parsed text of " + evt.start );
|
||||
plus();
|
||||
equals( evt.end, sub.end, "Correctly parsed end at " + evt.start );
|
||||
equal( evt.end, sub.end, "Correctly parsed end at " + evt.start );
|
||||
plus();
|
||||
}
|
||||
});
|
||||
|
||||
equals( subs.length, numSubs, "Parsed all subtitles" );
|
||||
equal( subs.length, numSubs, "Parsed all subtitles" );
|
||||
plus();
|
||||
});
|
||||
});
|
||||
|
|
|
@ -86,21 +86,21 @@ test( "Popcorn 0.3 SRT Parser Plugin", function () {
|
|||
if( evt._natives.type === "subtitle" ) {
|
||||
sub = expectedSubs[ numSubs++ ];
|
||||
|
||||
equals( sub.id, evt.id, "Correct id" );
|
||||
equal( sub.id, evt.id, "Correct id" );
|
||||
plus();
|
||||
|
||||
equals( sub.start, evt.start, "Correct start" );
|
||||
equal( sub.start, evt.start, "Correct start" );
|
||||
plus();
|
||||
|
||||
equals( sub.end, evt.end, "Correct end" );
|
||||
equal( sub.end, evt.end, "Correct end" );
|
||||
plus();
|
||||
|
||||
equals( sub.text, evt.text, "Correct text" );
|
||||
equal( sub.text, evt.text, "Correct text" );
|
||||
plus();
|
||||
}
|
||||
});
|
||||
|
||||
equals( expectedSubs.length, numSubs, "Correctly parsed all subtitles" );
|
||||
equal( expectedSubs.length, numSubs, "Correctly parsed all subtitles" );
|
||||
plus();
|
||||
|
||||
}, 500);
|
||||
|
|
|
@ -40,16 +40,16 @@ test( "Popcorn 0.3 SSA/ASS Parser Plugin", function () {
|
|||
if( evt._natives.type === "subtitle" ) {
|
||||
sub = subs[ numSubs++ ];
|
||||
|
||||
equals( evt.start, sub.start, "Correctly parsed start of " + evt.start );
|
||||
equal( evt.start, sub.start, "Correctly parsed start of " + evt.start );
|
||||
plus();
|
||||
equals( evt.text, sub.text, "Correctly parsed text of " + evt.start );
|
||||
equal( evt.text, sub.text, "Correctly parsed text of " + evt.start );
|
||||
plus();
|
||||
equals( evt.end, sub.end, "Correctly parsed end at " + evt.start );
|
||||
equal( evt.end, sub.end, "Correctly parsed end at " + evt.start );
|
||||
plus();
|
||||
}
|
||||
});
|
||||
|
||||
equals( subs.length, numSubs, "Parsed all subtitles" );
|
||||
equal( subs.length, numSubs, "Parsed all subtitles" );
|
||||
plus();
|
||||
|
||||
}, 500);
|
||||
|
|
|
@ -42,18 +42,18 @@ test( "Popcorn 0.3 TTXT Parser Plugin", function () {
|
|||
if( evt._natives.type === "subtitle" ) {
|
||||
sub = subs[ numSubs++ ];
|
||||
|
||||
equals( sub.end, evt.end , "Correct end" );
|
||||
equal( sub.end, evt.end , "Correct end" );
|
||||
plus();
|
||||
|
||||
equals( sub.start, evt.start , "Correct start" );
|
||||
equal( sub.start, evt.start , "Correct start" );
|
||||
plus();
|
||||
|
||||
equals( sub.text, evt.text , "Correct text" );
|
||||
equal( sub.text, evt.text , "Correct text" );
|
||||
plus();
|
||||
}
|
||||
});
|
||||
|
||||
equals( subs.length, numSubs , "Correctly parsed all subs" );
|
||||
equal( subs.length, numSubs , "Correctly parsed all subs" );
|
||||
plus();
|
||||
}, 500);
|
||||
});
|
||||
|
|
|
@ -59,7 +59,7 @@ test( "Popcorn 1.0 WebSRT/VTT Parser Plugin", function () {
|
|||
}
|
||||
});
|
||||
|
||||
equals( expectedSubs.length, numSubs, "Parsed all subtitles" );
|
||||
equal( expectedSubs.length, numSubs, "Parsed all subtitles" );
|
||||
plus();
|
||||
|
||||
}, 500);
|
||||
|
|
|
@ -106,7 +106,7 @@ test( "Default Attribute Functionality", function () {
|
|||
});
|
||||
|
||||
playerDefault.addEventListener( "load", function() {
|
||||
equals( playerDefault.duration, 213.89, "Duration updated" );
|
||||
equal( playerDefault.duration, 213.89, "Duration updated" );
|
||||
plus();
|
||||
});
|
||||
|
||||
|
@ -117,20 +117,20 @@ test( "Default Attribute Functionality", function () {
|
|||
actual = playerDefault[prop]();
|
||||
}
|
||||
|
||||
equals( actual, val, "player." + prop + " should have default value: '" + val + "'" );
|
||||
equal( actual, val, "player." + prop + " should have default value: '" + val + "'" );
|
||||
plus();
|
||||
});
|
||||
|
||||
equals( document.getElementById( "player_2" ).children.length, 2, "The container has 2 players" );
|
||||
equal( document.getElementById( "player_2" ).children.length, 2, "The container has 2 players" );
|
||||
plus();
|
||||
|
||||
equals( playerDefault.width, playerDefault.offsetWidth+"px", "Width is stringified version of offsetWidth" );
|
||||
equal( playerDefault.width, playerDefault.offsetWidth+"px", "Width is stringified version of offsetWidth" );
|
||||
plus();
|
||||
|
||||
equals( playerOverride.width, "90%", "Width has been overridden" );
|
||||
equal( playerOverride.width, "90%", "Width has been overridden" );
|
||||
plus();
|
||||
|
||||
equals( playerOverride.height, "81px", "Height has been overridden to 100px, but set back again to 81px" );
|
||||
equal( playerOverride.height, "81px", "Height has been overridden to 100px, but set back again to 81px" );
|
||||
plus();
|
||||
});
|
||||
|
||||
|
@ -158,7 +158,7 @@ test( "Player Volume Control", function () {
|
|||
return;
|
||||
}
|
||||
|
||||
equals( player.volume, targetVolume, "Volume change set correctly" );
|
||||
equal( player.volume, targetVolume, "Volume change set correctly" );
|
||||
plus();
|
||||
|
||||
if ( targetVolume !== 0 ) {
|
||||
|
@ -243,7 +243,7 @@ test( "Testing Comments", function() {
|
|||
stop( 5000 );
|
||||
|
||||
Popcorn.forEach( players, function ( player, name ) {
|
||||
equals( player._comments[0].display(), commentOutput[name](), name + " formatted as expected" );
|
||||
equal( player._comments[0].display(), commentOutput[name](), name + " formatted as expected" );
|
||||
plus();
|
||||
});
|
||||
});
|
||||
|
@ -314,7 +314,7 @@ test( "Events and Player Control", function () {
|
|||
ok( true, "Playing was fired" );
|
||||
plus();
|
||||
|
||||
equals( player.paused, 0, "Paused is unset" );
|
||||
equal( player.paused, 0, "Paused is unset" );
|
||||
plus();
|
||||
});
|
||||
|
||||
|
@ -342,7 +342,7 @@ test( "Events and Player Control", function () {
|
|||
ok( true, "ReadyStateChange was fired" );
|
||||
plus();
|
||||
|
||||
equals( player.readyState, 3, "Ready State is now 3" );
|
||||
equal( player.readyState, 3, "Ready State is now 3" );
|
||||
plus();
|
||||
|
||||
player.pause();
|
||||
|
@ -352,7 +352,7 @@ test( "Events and Player Control", function () {
|
|||
ok( true, "Pause was fired by dispatch" );
|
||||
plus();
|
||||
|
||||
equals( player.paused, 1, "Paused is set" );
|
||||
equal( player.paused, 1, "Paused is set" );
|
||||
plus();
|
||||
});
|
||||
|
||||
|
@ -394,7 +394,7 @@ test( "Events and Player Control", function () {
|
|||
ok( true, "Media is done playing" );
|
||||
plus();
|
||||
|
||||
equals( player.paused, 1, "Paused is set on end" );
|
||||
equal( player.paused, 1, "Paused is set on end" );
|
||||
plus();
|
||||
});
|
||||
|
||||
|
|
|
@ -290,7 +290,7 @@ test( "Plugin Factory", function() {
|
|||
|
||||
ok( "executor" in popped, "executor plugin is now available to instance" );
|
||||
plus();
|
||||
equals( Popcorn.registry.length, 1, "One item in the registry");
|
||||
equal( Popcorn.registry.length, 1, "One item in the registry");
|
||||
plus();
|
||||
|
||||
popped.executor({
|
||||
|
@ -337,7 +337,7 @@ test( "Plugin Factory", function() {
|
|||
|
||||
ok( "complicator" in popped, "complicator plugin is now available to instance" );
|
||||
plus();
|
||||
equals( Popcorn.registry.length, 2, "Two items in the registry");
|
||||
equal( Popcorn.registry.length, 2, "Two items in the registry");
|
||||
plus();
|
||||
|
||||
popped.complicator({
|
||||
|
@ -366,10 +366,10 @@ test( "Popcorn vimeo Plugin Url and Duration Tests", function() {
|
|||
expect( expects );
|
||||
stop( 10000 );
|
||||
|
||||
equals( popcorn.media.id, "player_1", "Video id set" );
|
||||
equal( popcorn.media.id, "player_1", "Video id set" );
|
||||
plus();
|
||||
|
||||
equals( popcorn.duration(), 0, "Duration starts as 0");
|
||||
equal( popcorn.duration(), 0, "Duration starts as 0");
|
||||
plus();
|
||||
|
||||
popcorn.listen( "durationchange", function() {
|
||||
|
@ -410,7 +410,7 @@ test( "Popcorn vimeo Plugin Url Regex Test", function() {
|
|||
|
||||
popcorn.listen( "loadeddata", function() {
|
||||
|
||||
equals( popcorn.media.src, urlTest.expected, "Video id is correct for " + urlTest.name + ": " + urlTest.url );
|
||||
equal( popcorn.media.src, urlTest.expected, "Video id is correct for " + urlTest.name + ": " + urlTest.url );
|
||||
popcorn.pause();
|
||||
|
||||
count++;
|
||||
|
@ -442,9 +442,9 @@ test( "Popcorn Vimeo Plugin offsetHeight && offsetWidth Test", function() {
|
|||
|
||||
popped.listen( "loadeddata", function() {
|
||||
elem = document.querySelector( "div#player_3 object" );
|
||||
equals( elem.height, popped.media.offsetHeight, "The media object is reporting the correct offsetHeight" );
|
||||
equal( elem.height, popped.media.offsetHeight, "The media object is reporting the correct offsetHeight" );
|
||||
plus();
|
||||
equals( elem.width, popped.media.offsetWidth, "The media object is reporting the correct offsetWidth" );
|
||||
equal( elem.width, popped.media.offsetWidth, "The media object is reporting the correct offsetWidth" );
|
||||
plus();
|
||||
});
|
||||
|
||||
|
|
|
@ -290,7 +290,7 @@ test("Plugin Factory", function () {
|
|||
|
||||
ok( "executor" in popped, "executor plugin is now available to instance" );
|
||||
plus();
|
||||
equals( Popcorn.registry.length, 1, "One item in the registry");
|
||||
equal( Popcorn.registry.length, 1, "One item in the registry");
|
||||
plus();
|
||||
|
||||
popped.executor({
|
||||
|
@ -338,7 +338,7 @@ test("Plugin Factory", function () {
|
|||
|
||||
ok( "complicator" in popped, "complicator plugin is now available to instance" );
|
||||
plus();
|
||||
equals( Popcorn.registry.length, 2, "Two items in the registry");
|
||||
equal( Popcorn.registry.length, 2, "Two items in the registry");
|
||||
plus();
|
||||
|
||||
popped.complicator({
|
||||
|
@ -369,7 +369,7 @@ test( "Popcorn YouTube Plugin Url and Duration Tests", function() {
|
|||
expect( expects );
|
||||
stop( 10000 );
|
||||
|
||||
equals( popcorn.media.id, 'video2', 'Video id set' );
|
||||
equal( popcorn.media.id, 'video2', 'Video id set' );
|
||||
plus();
|
||||
|
||||
popcorn.listen( "durationchange", function() {
|
||||
|
@ -380,7 +380,7 @@ test( "Popcorn YouTube Plugin Url and Duration Tests", function() {
|
|||
popcorn.pause();
|
||||
});
|
||||
|
||||
equals( popcorn.media.id, 'video2', 'Video id set' );
|
||||
equal( popcorn.media.id, 'video2', 'Video id set' );
|
||||
plus();
|
||||
|
||||
popcorn.volume( 0 ).play();
|
||||
|
@ -431,7 +431,7 @@ test( "Popcorn YouTube Plugin Url Regex Test", function() {
|
|||
|
||||
popcorn.listen( "loadeddata", function() {
|
||||
|
||||
equals( popcorn.media.src, urlTest.expected, "Video id is correct for " + urlTest.name + ": " + urlTest.url );
|
||||
equal( popcorn.media.src, urlTest.expected, "Video id is correct for " + urlTest.name + ": " + urlTest.url );
|
||||
popcorn.pause();
|
||||
|
||||
popcorn.destroy();
|
||||
|
@ -571,9 +571,9 @@ test( "Popcorn Youtube Plugin offsetHeight && offsetWidth Test", function() {
|
|||
var runner = function() {
|
||||
popped.volume( 0 );
|
||||
elem = document.querySelector( "div#video6 object" );
|
||||
equals( elem.height, popped.media.offsetHeight, "The media object is reporting the correct offsetHeight" );
|
||||
equal( elem.height, popped.media.offsetHeight, "The media object is reporting the correct offsetHeight" );
|
||||
plus();
|
||||
equals( elem.width, popped.media.offsetWidth, "The media object is reporting the correct offsetWidth" );
|
||||
equal( elem.width, popped.media.offsetWidth, "The media object is reporting the correct offsetWidth" );
|
||||
plus();
|
||||
};
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ test( "Popcorn attribution Plugin", function() {
|
|||
ok( "attribution" in popped, "attribution is a method of the popped instance" );
|
||||
plus();
|
||||
|
||||
equals( attributiondiv.childElementCount, 0, "initially, there is nothing inside the attributiondiv" );
|
||||
equal( attributiondiv.childElementCount, 0, "initially, there is nothing inside the attributiondiv" );
|
||||
plus();
|
||||
|
||||
popped.attribution({
|
||||
|
@ -45,9 +45,9 @@ test( "Popcorn attribution Plugin", function() {
|
|||
setupId = popped.getLastTrackEventId();
|
||||
|
||||
popped.exec( 0, function() {
|
||||
equals( attributiondiv.childElementCount, 2, "attributiondiv now has two inner elements" );
|
||||
equal( attributiondiv.childElementCount, 2, "attributiondiv now has two inner elements" );
|
||||
plus();
|
||||
equals( attributiondiv.children[ 0 ].style.display , "inline", "attribution is visible on the page" );
|
||||
equal( attributiondiv.children[ 0 ].style.display , "inline", "attribution is visible on the page" );
|
||||
plus();
|
||||
});
|
||||
|
||||
|
@ -56,17 +56,17 @@ test( "Popcorn attribution Plugin", 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" );
|
||||
equal( attributiondiv.children[ 1 ].style.display, "inline", "second attribution is visible on the page" );
|
||||
plus();
|
||||
|
||||
equals( typeof popped.data.trackEvents.byStart[ 1 ]._license, "undefined", "undefined license is properly being handled" );
|
||||
equal( typeof popped.data.trackEvents.byStart[ 1 ]._license, "undefined", "undefined license is properly being handled" );
|
||||
plus();
|
||||
});
|
||||
|
||||
popped.exec( 4, function() {
|
||||
equals( attributiondiv.children[ 1 ].style.display, "none", "second attribution is no longer visible on the page" );
|
||||
equal( attributiondiv.children[ 1 ].style.display, "none", "second attribution is no longer visible on the page" );
|
||||
plus();
|
||||
equals( attributiondiv.children[ 0 ].style.display, "none", "first attribution is no longer visible on the page" );
|
||||
equal( attributiondiv.children[ 0 ].style.display, "none", "first attribution is no longer visible on the page" );
|
||||
plus();
|
||||
|
||||
popped.pause().removeTrackEvent( setupId );
|
||||
|
|
|
@ -19,7 +19,7 @@ test( "Popcorn Code Plugin", function() {
|
|||
ok( "code" in popped, "code is a method of the popped instance" );
|
||||
plus();
|
||||
|
||||
equals( codeDiv.innerHTML, "", "initially, there is nothing inside the code-div" );
|
||||
equal( codeDiv.innerHTML, "", "initially, there is nothing inside the code-div" );
|
||||
plus();
|
||||
|
||||
popped.code({
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
stop();
|
||||
ok( "documentcloud" in popped, "documentcloud is a method of the popped instance" );
|
||||
plus();
|
||||
equals( cloudDiv1.childElementCount, 0, " #cloud-div-1 is initially empty" );
|
||||
equal( cloudDiv1.childElementCount, 0, " #cloud-div-1 is initially empty" );
|
||||
plus();
|
||||
|
||||
popped.documentcloud({
|
||||
|
@ -63,32 +63,32 @@
|
|||
if ( ++docCount === 2 ) {
|
||||
wrapper1 = cloudDiv1.querySelector( "div" );
|
||||
wrapper2 = cloudDiv2.querySelector( "div" );
|
||||
equals( cloudDiv1.childElementCount > 0, true, "wrapper div is present in cloud-div-1" );
|
||||
equal( cloudDiv1.childElementCount > 0, true, "wrapper div is present in cloud-div-1" );
|
||||
plus();
|
||||
}
|
||||
})
|
||||
.cue( 3, function() {
|
||||
equals( wrapper1.style.visibility, "visible", "Document in cloud-div-1 div is visible" );
|
||||
equal( wrapper1.style.visibility, "visible", "Document in cloud-div-1 div is visible" );
|
||||
plus();
|
||||
equals( wrapper2.style.visibility, "hidden", "Document in cloud-div-2 div is visible" );
|
||||
equal( wrapper2.style.visibility, "hidden", "Document in cloud-div-2 div is visible" );
|
||||
plus();
|
||||
})
|
||||
.cue( 4.5, function() {
|
||||
equals( wrapper1.style.visibility, "hidden", "Document in cloud-div-1 div is not visible" );
|
||||
equal( wrapper1.style.visibility, "hidden", "Document in cloud-div-1 div is not visible" );
|
||||
plus();
|
||||
})
|
||||
.cue( 7, function() {
|
||||
equals( wrapper1.style.visibility, "visible", "Document in cloud-div-1 div is visible" );
|
||||
equal( wrapper1.style.visibility, "visible", "Document in cloud-div-1 div is visible" );
|
||||
plus();
|
||||
equals( wrapper2.style.visibility, "visible", "Document in cloud-div-2 is visible" );
|
||||
equal( wrapper2.style.visibility, "visible", "Document in cloud-div-2 is visible" );
|
||||
plus();
|
||||
})
|
||||
.cue( 8, function() {
|
||||
popped.removeTrackEvent( setupIds.pop() );
|
||||
equals( cloudDiv1.childElementCount > 0, true, "wrapper div is still present in cloud-div-1" );
|
||||
equal( cloudDiv1.childElementCount > 0, true, "wrapper div is still present in cloud-div-1" );
|
||||
plus();
|
||||
popped.removeTrackEvent( setupIds.pop() );
|
||||
equals( cloudDiv1.childElementCount === 0, true, "wrapper div is no longer present in cloud-div-1" );
|
||||
equal( cloudDiv1.childElementCount === 0, true, "wrapper div is no longer present in cloud-div-1" );
|
||||
plus();
|
||||
})
|
||||
.listen( "canplayall", function() {
|
||||
|
|
|
@ -88,17 +88,17 @@ test( "Popcorn Facebook Plugin", function () {
|
|||
plus();
|
||||
|
||||
popped.exec( 1, function() {
|
||||
equals( commentdiv.children[ 0 ].style.display, "none", "comment div is not visible on page with \"none\" display style" );
|
||||
equal( commentdiv.children[ 0 ].style.display, "none", "comment div is not visible on page with \"none\" display style" );
|
||||
plus();
|
||||
});
|
||||
// I inspected the html genterated by facebook, and found that there are no uniquely identifying attributes between plug-in types
|
||||
// so right now, we just check ot make sure that facebook is returning a plugin and displaying it at the correct time.
|
||||
popped.exec( 3, function() {
|
||||
// Counts number of children elements in likediv
|
||||
equals( likediv.childElementCount, 2, "likediv has 2 inner elements" );
|
||||
equal( likediv.childElementCount, 2, "likediv has 2 inner elements" );
|
||||
plus();
|
||||
// Checks display style is set correctly on startup
|
||||
equals( likediv.children[ 0 ].style.display , "", "likediv is visible on the page with \"\" display style" );
|
||||
equal( likediv.children[ 0 ].style.display , "", "likediv is visible on the page with \"\" display style" );
|
||||
plus();
|
||||
// Checks if likediv is empty at specific time
|
||||
ok( document.getElementById( "likediv" ).innerHTML, "likediv is not empty at 0:03 (expected)" );
|
||||
|
|
|
@ -19,7 +19,7 @@ test( "Popcorn Flickr Plugin", function() {
|
|||
ok( "flickr" in popped, "flickr is a method of the popped instance" );
|
||||
plus();
|
||||
|
||||
equals( flickrdiv.innerHTML, "", "initially, there is nothing inside the flickrdiv" );
|
||||
equal( flickrdiv.innerHTML, "", "initially, there is nothing inside the flickrdiv" );
|
||||
plus();
|
||||
|
||||
popped.flickr({
|
||||
|
|
|
@ -19,7 +19,7 @@ test( "Popcorn Footnote Plugin", function() {
|
|||
ok( "footnote" in popped, "footnote is a mehtod of the popped instance" );
|
||||
plus();
|
||||
|
||||
equals( footnotediv.childElementCount, 0, "initially, there is nothing inside the footnotediv" );
|
||||
equal( footnotediv.childElementCount, 0, "initially, there is nothing inside the footnotediv" );
|
||||
plus();
|
||||
|
||||
popped.footnote({
|
||||
|
@ -38,16 +38,16 @@ test( "Popcorn Footnote Plugin", function() {
|
|||
setupId = popped.getLastTrackEventId();
|
||||
|
||||
popped.exec( 0, function() {
|
||||
equals( footnotediv.childElementCount, 2, "footnotediv now has two inner elements" );
|
||||
equal( footnotediv.childElementCount, 2, "footnotediv now has two inner elements" );
|
||||
plus();
|
||||
equals( footnotediv.children[ 0 ].innerHTML, "This video made exclusively for drumbeat.org", "footnote displaing correct information" );
|
||||
equal( footnotediv.children[ 0 ].innerHTML, "This video made exclusively for drumbeat.org", "footnote displaing correct information" );
|
||||
plus();
|
||||
equals( footnotediv.children[ 0 ].style.display, "inline", "footnote is visible on the page" );
|
||||
equal( footnotediv.children[ 0 ].style.display, "inline", "footnote is visible on the page" );
|
||||
plus();
|
||||
});
|
||||
|
||||
popped.exec( 3, function() {
|
||||
equals( footnotediv.children[ 1 ].style.display, "inline", "second footnote is visible on the page" );
|
||||
equal( footnotediv.children[ 1 ].style.display, "inline", "second footnote is visible on the page" );
|
||||
plus();
|
||||
});
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ test( "Popcorn GML Plugin", function() {
|
|||
ok( "gml" in popped, "gml is a method of the popped instance" );
|
||||
plus();
|
||||
|
||||
equals( gmldiv.childElementCount, 0, "initially, there is nothing inside the gmldiv" );
|
||||
equal( gmldiv.childElementCount, 0, "initially, there is nothing inside the gmldiv" );
|
||||
plus();
|
||||
|
||||
popped.gml({
|
||||
|
@ -38,19 +38,19 @@ test( "Popcorn GML Plugin", function() {
|
|||
setupId = popped.getLastTrackEventId();
|
||||
|
||||
popped.exec( 0, function() {
|
||||
equals( gmldiv.children[ 0 ].style.display , "block", "first GML is visible on the page" );
|
||||
equal( gmldiv.children[ 0 ].style.display , "block", "first GML is visible on the page" );
|
||||
plus();
|
||||
});
|
||||
|
||||
popped.exec( 3, function() {
|
||||
equals( gmldiv.children[ 1 ].style.display, "block", "second GML is visible on the page" );
|
||||
equal( gmldiv.children[ 1 ].style.display, "block", "second GML is visible on the page" );
|
||||
plus();
|
||||
});
|
||||
|
||||
popped.exec( 4, function() {
|
||||
equals( gmldiv.children[ 1 ].style.display, "none", "second GML is no longer visible on the page" );
|
||||
equal( gmldiv.children[ 1 ].style.display, "none", "second GML is no longer visible on the page" );
|
||||
plus();
|
||||
equals( gmldiv.children[ 0 ].style.display, "none", "first GML is no longer visible on the page" );
|
||||
equal( gmldiv.children[ 0 ].style.display, "none", "first GML is no longer visible on the page" );
|
||||
plus();
|
||||
|
||||
popped.pause().removeTrackEvent( setupId );
|
||||
|
|
|
@ -48,15 +48,15 @@ test( "Popcorn Google Feed Plugin", function() {
|
|||
plus();
|
||||
ok( document.getElementById( "_feed1" ), "First feed is on the page" );
|
||||
plus();
|
||||
equals ( document.getElementById( "_feed1" ).offsetParent.id, "feed", "First feed is inside the 'feed' div" );
|
||||
equal( document.getElementById( "_feed1" ).offsetParent.id, "feed", "First feed is inside the 'feed' div" );
|
||||
plus();
|
||||
equals( popped.data.trackEvents.byStart[ 1 ].orientation, "vertical", "Defaulting to vertical orientation" );
|
||||
equal( popped.data.trackEvents.byStart[ 1 ].orientation, "vertical", "Defaulting to vertical orientation" );
|
||||
plus();
|
||||
});
|
||||
popped.exec( 2, function() {
|
||||
ok( document.getElementById( "_feed2" ), "Second feed is on the page" );
|
||||
plus();
|
||||
equals( document.getElementById( "_feed2" ).offsetParent.id, "feed1", "Second feed is inside the 'feed2' div" );
|
||||
equal( document.getElementById( "_feed2" ).offsetParent.id, "feed1", "Second feed is inside the 'feed2' div" );
|
||||
plus();
|
||||
});
|
||||
popped.exec( 3, function() {
|
||||
|
|
|
@ -66,21 +66,21 @@ test( "Popcorn Google Map Plugin", function() {
|
|||
plus();
|
||||
ok( document.getElementById( "actualmap1" ), "First map is on the page" );
|
||||
plus();
|
||||
equals( document.getElementById( "actualmap1" ).offsetParent.id, "map", "First map is inside the 'map' div" );
|
||||
equal( document.getElementById( "actualmap1" ).offsetParent.id, "map", "First map is inside the 'map' div" );
|
||||
plus();
|
||||
equals( popped.data.trackEvents.byStart[ 1 ].zoom, 8, "Defaulting to zoom of 8" );
|
||||
equal( popped.data.trackEvents.byStart[ 1 ].zoom, 8, "Defaulting to zoom of 8" );
|
||||
plus();
|
||||
});
|
||||
|
||||
popped.exec( 1, function() {
|
||||
ok( document.getElementById( "actualmap2" ), "Second map is on the page" );
|
||||
plus();
|
||||
equals( document.getElementById( "actualmap2" ).offsetParent.id, "map2", "Second map is inside the 'map2' div" );
|
||||
equal( document.getElementById( "actualmap2" ).offsetParent.id, "map2", "Second map is inside the 'map2' div" );
|
||||
plus();
|
||||
});
|
||||
|
||||
popped.exec( 3, function() {
|
||||
equals( document.getElementById( "actualmap3" ).offsetParent.id, "map3", "Tweening map is inside the 'map3' div" );
|
||||
equal( document.getElementById( "actualmap3" ).offsetParent.id, "map3", "Tweening map is inside the 'map3' div" );
|
||||
plus();
|
||||
});
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ test( "Popcorn Image Plugin", function() {
|
|||
ok( "image" in popped, "image is a method of the popped instance" );
|
||||
plus();
|
||||
|
||||
equals( imagediv.innerHTML, "", "initially, there is nothing inside the imagediv" );
|
||||
equal( imagediv.innerHTML, "", "initially, there is nothing inside the imagediv" );
|
||||
plus();
|
||||
|
||||
popped.image({
|
||||
|
@ -51,14 +51,14 @@ test( "Popcorn Image Plugin", function() {
|
|||
setupId = popped.getLastTrackEventId();
|
||||
|
||||
popped.exec( 2, function() {
|
||||
equals( imagediv.children[ 0 ].style.display, "block", "Div contents are displayed" );
|
||||
equal( imagediv.children[ 0 ].style.display, "block", "Div contents are displayed" );
|
||||
plus();
|
||||
equals( imagediv.children[ 0 ].children[ 1 ].nodeName, "IMG", "An image exists" );
|
||||
equal( imagediv.children[ 0 ].children[ 1 ].nodeName, "IMG", "An image exists" );
|
||||
plus();
|
||||
});
|
||||
|
||||
popped.exec( 3, function() {
|
||||
equals( imagediv.children[ 0 ].style.display, "none", "Div contents are hidden again" );
|
||||
equal( imagediv.children[ 0 ].style.display, "none", "Div contents are hidden again" );
|
||||
plus();
|
||||
});
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ test( "Popcorn LastFM Plugin", function() {
|
|||
ok( "lastfm" in popped, "lastfm is a method of the popped instance" );
|
||||
plus();
|
||||
|
||||
equals( lastfmdiv.innerHTML, "", "initially, there is nothing inside the lastfmdiv" );
|
||||
equal( lastfmdiv.innerHTML, "", "initially, there is nothing inside the lastfmdiv" );
|
||||
plus();
|
||||
|
||||
popped.lastfm({
|
||||
|
@ -51,23 +51,23 @@ test( "Popcorn LastFM Plugin", function() {
|
|||
setupId = popped.getLastTrackEventId();
|
||||
|
||||
popped.exec( 2, function() {
|
||||
equals( lastfmdiv.childElementCount, 3, "lastfmdiv now has three inner elements" );
|
||||
equal( lastfmdiv.childElementCount, 3, "lastfmdiv now has three inner elements" );
|
||||
plus();
|
||||
equals( lastfmdiv.children[ 0 ].style.display , "inline", "yachtdiv is visible on the page" );
|
||||
equal( lastfmdiv.children[ 0 ].style.display , "inline", "yachtdiv is visible on the page" );
|
||||
plus();
|
||||
});
|
||||
|
||||
popped.exec( 3, function() {
|
||||
equals( lastfmdiv.children[ 0 ].style.display , "inline", "yachtdiv is still visible on the page" );
|
||||
equal( lastfmdiv.children[ 0 ].style.display , "inline", "yachtdiv is still visible on the page" );
|
||||
plus();
|
||||
equals( lastfmdiv.children[ 1 ].style.display , "inline", "beatlesdiv is visible on the page" );
|
||||
equal( lastfmdiv.children[ 1 ].style.display , "inline", "beatlesdiv is visible on the page" );
|
||||
plus();
|
||||
equals( lastfmdiv.children[ 2 ].style.display , "none", "nulldiv is not visible on the page" );
|
||||
equal( lastfmdiv.children[ 2 ].style.display , "none", "nulldiv is not visible on the page" );
|
||||
plus();
|
||||
});
|
||||
|
||||
popped.exec( 5, function() {
|
||||
equals( lastfmdiv.children[ 2 ].innerHTML , "Unknown Artist", "Artist information could not be found" );
|
||||
equal( lastfmdiv.children[ 2 ].innerHTML , "Unknown Artist", "Artist information could not be found" );
|
||||
plus();
|
||||
|
||||
popped.pause().removeTrackEvent( setupId );
|
||||
|
|
|
@ -28,7 +28,7 @@ test( "Popcorn LinkedIn Plugin", function() {
|
|||
plus();
|
||||
|
||||
// Testing the share plugin
|
||||
equals( sharediv.innerHTML, "", "initially, there is nothing inside the sharediv" );
|
||||
equal( sharediv.innerHTML, "", "initially, there is nothing inside the sharediv" );
|
||||
plus();
|
||||
|
||||
popped.linkedin({
|
||||
|
@ -56,7 +56,7 @@ test( "Popcorn LinkedIn Plugin", function() {
|
|||
});
|
||||
|
||||
// Testing the recommendproduct plugin
|
||||
equals( recommenddiv.innerHTML, "", "initially, there is nothing inside the recommenddiv" );
|
||||
equal( recommenddiv.innerHTML, "", "initially, there is nothing inside the recommenddiv" );
|
||||
plus();
|
||||
|
||||
popped.linkedin({
|
||||
|
@ -85,7 +85,7 @@ test( "Popcorn LinkedIn Plugin", function() {
|
|||
});
|
||||
|
||||
// Testing memberprofile plugin
|
||||
equals( memberprofilediv.innerHTML, "", "initially, there is nothing inside the memberprofilediv" );
|
||||
equal( memberprofilediv.innerHTML, "", "initially, there is nothing inside the memberprofilediv" );
|
||||
plus();
|
||||
|
||||
popped.linkedin({
|
||||
|
@ -113,7 +113,7 @@ test( "Popcorn LinkedIn Plugin", function() {
|
|||
});
|
||||
|
||||
// Testing the company insider plugin
|
||||
equals( companyinsiderdiv.innerHTML, "", "initially, there is nothing inside the companyinsiderdiv" );
|
||||
equal( companyinsiderdiv.innerHTML, "", "initially, there is nothing inside the companyinsiderdiv" );
|
||||
plus();
|
||||
|
||||
popped.linkedin({
|
||||
|
@ -140,7 +140,7 @@ test( "Popcorn LinkedIn Plugin", function() {
|
|||
});
|
||||
|
||||
// Testing company profile plugin
|
||||
equals( companyprofilediv.innerHTML, "", "initially, there is nothing inside the companyprofilediv" );
|
||||
equal( companyprofilediv.innerHTML, "", "initially, there is nothing inside the companyprofilediv" );
|
||||
plus();
|
||||
|
||||
popped.linkedin({
|
||||
|
|
|
@ -18,7 +18,7 @@ test( "Popcorn lower third Plugin", function() {
|
|||
ok( "lowerthird" in popped, "lowerthird is a method of the popped instance" );
|
||||
plus();
|
||||
|
||||
equals ( lowerthirddiv.innerHTML, "", "initially, there is nothing inside the lowerthirddiv" );
|
||||
equal( lowerthirddiv.innerHTML, "", "initially, there is nothing inside the lowerthirddiv" );
|
||||
plus();
|
||||
|
||||
ok( !popped.container, "initially, there is no default div" );
|
||||
|
@ -56,19 +56,19 @@ test( "Popcorn lower third Plugin", function() {
|
|||
.volume( 0 );
|
||||
|
||||
popped.exec( 1, function() {
|
||||
equals( popped.container.innerHTML, "Mr Hyde<br>Monster", "first lowerthird is visible" );
|
||||
equal( popped.container.innerHTML, "Mr Hyde<br>Monster", "first lowerthird is visible" );
|
||||
plus();
|
||||
});
|
||||
|
||||
popped.exec( 3, function() {
|
||||
equals( lowerthirddiv.innerHTML, "<div>Dr Jekyll<br>Person</div>", "second lowerthird is visible" );
|
||||
equal( lowerthirddiv.innerHTML, "<div>Dr Jekyll<br>Person</div>", "second lowerthird is visible" );
|
||||
plus();
|
||||
});
|
||||
|
||||
popped.exec( 5, function() {
|
||||
equals( popped.container.innerHTML, "", "first lowerthird is empty" );
|
||||
equal( popped.container.innerHTML, "", "first lowerthird is empty" );
|
||||
plus();
|
||||
equals( lowerthirddiv.innerHTML, "<div></div>", "second lowerthird is empty" );
|
||||
equal( lowerthirddiv.innerHTML, "<div></div>", "second lowerthird is empty" );
|
||||
plus();
|
||||
});
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ test( "Popcorn Mustache Plugin", function() {
|
|||
ok( "mustache" in popped, "mustache is a method of the popped instance" );
|
||||
plus();
|
||||
|
||||
equals ( mustacheDiv.innerHTML, "", "initially, there is nothing inside the mustache-div" );
|
||||
equal( mustacheDiv.innerHTML, "", "initially, there is nothing inside the mustache-div" );
|
||||
plus();
|
||||
|
||||
// Static strings
|
||||
|
@ -53,7 +53,7 @@ test( "Popcorn Mustache Plugin", function() {
|
|||
});
|
||||
|
||||
function runTest( a, b ) {
|
||||
equals( mustacheDiv.innerHTML, "<h1>mustache - test " + a + "/3<\/h1>", "Mustache template rendered" );
|
||||
equal( mustacheDiv.innerHTML, "<h1>mustache - test " + a + "/3<\/h1>", "Mustache template rendered" );
|
||||
plus();
|
||||
}
|
||||
|
||||
|
|
|
@ -73,24 +73,24 @@ test( "Popcorn OpenMap Plugin", function() {
|
|||
ok( document.getElementById( "openmapdiv1" ), "First map is on the page" );
|
||||
plus();
|
||||
|
||||
equals( document.getElementById( "openmapdiv1" ).offsetParent.id, "map", "First map is inside the 'map' div" );
|
||||
equal( document.getElementById( "openmapdiv1" ).offsetParent.id, "map", "First map is inside the 'map' div" );
|
||||
plus();
|
||||
|
||||
ok( document.getElementById( "openmapdiv2" ), "Second map is on the page" );
|
||||
plus();
|
||||
|
||||
equals( document.getElementById( "openmapdiv2" ).offsetParent.id, "map2", "Second map is inside the 'map2' div" );
|
||||
equal( document.getElementById( "openmapdiv2" ).offsetParent.id, "map2", "Second map is inside the 'map2' div" );
|
||||
plus();
|
||||
|
||||
ok( document.getElementById( "openmapdiv3" ), "Third map is on the page" );
|
||||
plus();
|
||||
|
||||
equals( document.getElementById( "openmapdiv3" ).offsetParent.id, "map3", "Third map is inside the 'map3' div" );
|
||||
equal( document.getElementById( "openmapdiv3" ).offsetParent.id, "map3", "Third map is inside the 'map3' div" );
|
||||
plus();
|
||||
|
||||
ok( document.getElementById( "openmapdiv4" ), "Fourth map is on the page" );
|
||||
plus();
|
||||
equals( document.getElementById( "openmapdiv4" ).offsetParent.id, "map4", "Fourth map is inside the 'map4' div" );
|
||||
equal( document.getElementById( "openmapdiv4" ).offsetParent.id, "map4", "Fourth map is inside the 'map4' div" );
|
||||
plus();
|
||||
|
||||
} )
|
||||
|
|
|
@ -22,16 +22,16 @@ test( "Processing plugin tests", function() {
|
|||
ok( "processing" in popped, "processing is a method of the popped instance" );
|
||||
plus();
|
||||
|
||||
equals( processingDiv.innerHTML, "", "'processing-div-1' is empty" );
|
||||
equal( processingDiv.innerHTML, "", "'processing-div-1' is empty" );
|
||||
plus();
|
||||
|
||||
equals( processingDiv2.innerHTML, "", "'processing-div-2' is empty" );
|
||||
equal( processingDiv2.innerHTML, "", "'processing-div-2' is empty" );
|
||||
plus();
|
||||
|
||||
equals( processingDiv3.innerHTML, "", "'processing-div-3' is empty" );
|
||||
equal( processingDiv3.innerHTML, "", "'processing-div-3' is empty" );
|
||||
plus();
|
||||
|
||||
equals( processingDiv4.innerHTML, "", "'processing-div-4' is empty" );
|
||||
equal( processingDiv4.innerHTML, "", "'processing-div-4' is empty" );
|
||||
plus();
|
||||
|
||||
popped.processing({
|
||||
|
@ -67,35 +67,35 @@ test( "Processing plugin tests", function() {
|
|||
trackids.push( popped.getLastTrackEventId() );
|
||||
|
||||
popped.exec( 0.5, function() {
|
||||
equals( processingDiv.children[ 0 ].style.display, "inline", "canvas '" + processingDiv.children[ 0 ].id + "' is displayed" );
|
||||
equal( processingDiv.children[ 0 ].style.display, "inline", "canvas '" + processingDiv.children[ 0 ].id + "' is displayed" );
|
||||
plus();
|
||||
equals( processingDiv2.children[ 0 ].style.display, "none", "canvas '" + processingDiv2.children[ 0 ].id + "' is hidden" );
|
||||
equal( processingDiv2.children[ 0 ].style.display, "none", "canvas '" + processingDiv2.children[ 0 ].id + "' is hidden" );
|
||||
plus();
|
||||
equals( processingDiv3.children[ 0 ].style.display, "none", "canvas '" + processingDiv3.children[ 0 ].id + "' is hidden" );
|
||||
equal( processingDiv3.children[ 0 ].style.display, "none", "canvas '" + processingDiv3.children[ 0 ].id + "' is hidden" );
|
||||
plus();
|
||||
equals( processingDiv4.children[ 0 ].style.display, "none", "canvas '" + processingDiv4.children[ 0 ].id + "' is hidden" );
|
||||
equal( processingDiv4.children[ 0 ].style.display, "none", "canvas '" + processingDiv4.children[ 0 ].id + "' is hidden" );
|
||||
plus();
|
||||
//TODO: David Humphrey has written code that allows for listening to events on Processing instances. when
|
||||
// it lands In the next processing release we'll be able to detect if a processing instance is looping or not.
|
||||
// this is required in order to test the noPause functionality (automatically)
|
||||
})
|
||||
.exec( 1.5, function() {
|
||||
equals( processingDiv.children[ 0 ].style.display, "none", "canvas '" + processingDiv.children[ 0 ].id + "' is hidden" );
|
||||
equal( processingDiv.children[ 0 ].style.display, "none", "canvas '" + processingDiv.children[ 0 ].id + "' is hidden" );
|
||||
plus();
|
||||
equals( processingDiv2.children[ 0 ].style.display, "inline", "canvas '" + processingDiv2.children[ 0 ].id + "' is displayed" );
|
||||
equal( processingDiv2.children[ 0 ].style.display, "inline", "canvas '" + processingDiv2.children[ 0 ].id + "' is displayed" );
|
||||
plus();
|
||||
equals( processingDiv3.children[ 0 ].style.display, "none", "canvas '" + processingDiv3.children[ 0 ].id + "' is hidden" );
|
||||
equal( processingDiv3.children[ 0 ].style.display, "none", "canvas '" + processingDiv3.children[ 0 ].id + "' is hidden" );
|
||||
plus();
|
||||
equals( processingDiv4.children[ 0 ].style.display, "none", "canvas '" + processingDiv4.children[ 0 ].id + "' is hidden" );
|
||||
equal( processingDiv4.children[ 0 ].style.display, "none", "canvas '" + processingDiv4.children[ 0 ].id + "' is hidden" );
|
||||
plus();
|
||||
}).exec( 3.5, function() {
|
||||
equals( processingDiv.children[ 0 ].style.display, "none", "canvas '" + processingDiv.children[ 0 ].id + "' is hidden" );
|
||||
equal( processingDiv.children[ 0 ].style.display, "none", "canvas '" + processingDiv.children[ 0 ].id + "' is hidden" );
|
||||
plus();
|
||||
equals( processingDiv2.children[ 0 ].style.display, "none", "canvas '" + processingDiv2.children[ 0 ].id + "' is hidden" );
|
||||
equal( processingDiv2.children[ 0 ].style.display, "none", "canvas '" + processingDiv2.children[ 0 ].id + "' is hidden" );
|
||||
plus();
|
||||
equals( processingDiv3.children[ 0 ].style.display, "inline", "canvas '" + processingDiv3.children[ 0 ].id + "' is displayed" );
|
||||
equal( processingDiv3.children[ 0 ].style.display, "inline", "canvas '" + processingDiv3.children[ 0 ].id + "' is displayed" );
|
||||
plus();
|
||||
equals( processingDiv4.children[ 0 ].style.display, "inline", "canvas '" + processingDiv4.children[ 0 ].id + "' is displayed" );
|
||||
equal( processingDiv4.children[ 0 ].style.display, "inline", "canvas '" + processingDiv4.children[ 0 ].id + "' is displayed" );
|
||||
plus();
|
||||
}).exec( 4.5, function() {
|
||||
var idx = 5;
|
||||
|
@ -111,7 +111,7 @@ test( "Processing plugin tests", function() {
|
|||
|
||||
//check that four canvases were created
|
||||
canvases = document.querySelectorAll( "canvas" );
|
||||
equals( canvases.length, 4, "four canvases are present" );
|
||||
equal( canvases.length, 4, "four canvases are present" );
|
||||
plus();
|
||||
|
||||
//enable this when ticket #583 lands
|
||||
|
@ -125,10 +125,10 @@ test( "Processing plugin tests", function() {
|
|||
}
|
||||
}
|
||||
|
||||
equals( idCount, 1, ctx.id + " is a unique canvas id" );
|
||||
equal( idCount, 1, ctx.id + " is a unique canvas id" );
|
||||
plus();
|
||||
|
||||
equals( ctx.style.display, "none", ctx.id + " is hidden initially" );
|
||||
equal( ctx.style.display, "none", ctx.id + " is hidden initially" );
|
||||
plus();
|
||||
});
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ test( "Popcorn Rdio Plugin", function() {
|
|||
ok( "rdio" in popped, "rdio is a method of the popped instance" );
|
||||
plus();
|
||||
|
||||
equals( rdiodiv2.innerHTML, "", "initially, there is nothing inside the rdiodiv" );
|
||||
equal( rdiodiv2.innerHTML, "", "initially, there is nothing inside the rdiodiv" );
|
||||
plus();
|
||||
|
||||
popped.rdio({
|
||||
|
@ -59,27 +59,27 @@ test( "Popcorn Rdio Plugin", function() {
|
|||
});
|
||||
setupId = popped.getLastTrackEventId();
|
||||
popped.exec( 2, function() {
|
||||
equals( rdiodiv.childElementCount, 2, "rdiodiv now has two inner elements" );
|
||||
equal( rdiodiv.childElementCount, 2, "rdiodiv now has two inner elements" );
|
||||
plus();
|
||||
equals( rdiodiv.children[ 0 ].style.display , "inline", "Erykah Badu div is visible on the page" );
|
||||
equal( rdiodiv.children[ 0 ].style.display , "inline", "Erykah Badu div is visible on the page" );
|
||||
plus();
|
||||
});
|
||||
|
||||
popped.exec( 3, function() {
|
||||
equals( rdiodiv.children[ 0 ].style.display , "inline", "Erykah Badu div is still visible on the page" );
|
||||
equal( rdiodiv.children[ 0 ].style.display , "inline", "Erykah Badu div is still visible on the page" );
|
||||
plus();
|
||||
equals( rdiodiv.children[ 1 ].style.display , "inline", "Scottyhons div is visible on the page" );
|
||||
equal( rdiodiv.children[ 1 ].style.display , "inline", "Scottyhons div is visible on the page" );
|
||||
plus();
|
||||
equals( rdiodiv2.children[ 0 ].style.display , "none", "null div is not visible on the page" );
|
||||
equal( rdiodiv2.children[ 0 ].style.display , "none", "null div is not visible on the page" );
|
||||
plus();
|
||||
equals( rdiodiv3.children[ 0 ].style.display , "none", "null div is not visible on the page" );
|
||||
equal( rdiodiv3.children[ 0 ].style.display , "none", "null div is not visible on the page" );
|
||||
plus();
|
||||
});
|
||||
|
||||
popped.exec( 5, function() {
|
||||
equals( rdiodiv2.children[ 0 ].innerHTML , "Unknown Source", "Artist information could not be found" );
|
||||
equal( rdiodiv2.children[ 0 ].innerHTML , "Unknown Source", "Artist information could not be found" );
|
||||
plus();
|
||||
equals( rdiodiv3.children[ 0 ].innerHTML , "Unknown Source", "Playlist information could not be found" );
|
||||
equal( rdiodiv3.children[ 0 ].innerHTML , "Unknown Source", "Playlist information could not be found" );
|
||||
plus();
|
||||
|
||||
popped.pause().removeTrackEvent( setupId );
|
||||
|
|
|
@ -61,7 +61,7 @@ test( "Popcorn Subtitle Plugin", function() {
|
|||
popped.exec( 1, function() {
|
||||
|
||||
popped.media.pause();
|
||||
equals( subtitlediv.children[ 0 ].innerHTML, "this is the first subtitle of 2011", "subtitle displaying correct information" );
|
||||
equal( subtitlediv.children[ 0 ].innerHTML, "this is the first subtitle of 2011", "subtitle displaying correct information" );
|
||||
plus();
|
||||
|
||||
// capturing location now, to check against later,
|
||||
|
@ -93,12 +93,12 @@ test( "Popcorn Subtitle Plugin", function() {
|
|||
// check values against the video's values
|
||||
// we need four checks because if we just check against video's position,
|
||||
// and video's position hasn't updated either, we'll pass when we should fail
|
||||
equals( subtitlediv.style.left, popped.position().left + "px", "subtitle left position moved" );
|
||||
equal( subtitlediv.style.left, popped.position().left + "px", "subtitle left position moved" );
|
||||
plus();
|
||||
ok( Popcorn.position( subtitlediv ).top > popped.position().top, "subtitle top position moved" );
|
||||
plus();
|
||||
|
||||
equals( subtitlediv.children[ 1 ].innerHTML, "this is the second subtitle of 2011", "subtitle displaying correct information" );
|
||||
equal( subtitlediv.children[ 1 ].innerHTML, "this is the second subtitle of 2011", "subtitle displaying correct information" );
|
||||
plus();
|
||||
|
||||
popped.media.play();
|
||||
|
@ -108,7 +108,7 @@ test( "Popcorn Subtitle Plugin", function() {
|
|||
popped.exec( 4, function() {
|
||||
|
||||
popped.media.pause();
|
||||
equals( subtitlediv.children[ 1 ].innerHTML, "", "subtitle is clear" );
|
||||
equal( subtitlediv.children[ 1 ].innerHTML, "", "subtitle is clear" );
|
||||
plus();
|
||||
|
||||
popped.media.play();
|
||||
|
@ -123,9 +123,9 @@ test( "Popcorn Subtitle Plugin", function() {
|
|||
popped2.exec( 8, function() {
|
||||
popped2.media.pause();
|
||||
|
||||
equals( subtitlediv.children[ 3 ].innerHTML, "instance one test", "subtitle displaying correct information" );
|
||||
equal( subtitlediv.children[ 3 ].innerHTML, "instance one test", "subtitle displaying correct information" );
|
||||
plus();
|
||||
equals( subtitle2div.children[ 0 ].innerHTML, "instance two test", "subtitle displaying correct information" );
|
||||
equal( subtitle2div.children[ 0 ].innerHTML, "instance two test", "subtitle displaying correct information" );
|
||||
plus();
|
||||
|
||||
popped.media.play();
|
||||
|
@ -169,7 +169,7 @@ test( "subtitle data tests", function() {
|
|||
|
||||
popped.pause( 0 );
|
||||
|
||||
equals( container.children[ 0 ].innerHTML, "", "subtitle with no text defaults to an empty string" );
|
||||
equal( container.children[ 0 ].innerHTML, "", "subtitle with no text defaults to an empty string" );
|
||||
plus();
|
||||
});
|
||||
|
||||
|
@ -202,11 +202,11 @@ test( "subtitle container creation tests", function() {
|
|||
|
||||
containerAfterParse = document.getElementById("divThatDoesntExist");
|
||||
|
||||
equals( !!containerAtLoad, false, "Container doesn't exist initially" );
|
||||
equal( !!containerAtLoad, false, "Container doesn't exist initially" );
|
||||
plus();
|
||||
equals( !!containerAfterParse, true, "Container exists now" );
|
||||
equal( !!containerAfterParse, true, "Container exists now" );
|
||||
plus();
|
||||
equals( containerAfterParse.children[ 0 ].innerHTML, "My Text", "Subtitle displayed in created container" );
|
||||
equal( containerAfterParse.children[ 0 ].innerHTML, "My Text", "Subtitle displayed in created container" );
|
||||
plus();
|
||||
|
||||
// Cleanup
|
||||
|
|
|
@ -19,7 +19,7 @@ test( "Popcorn tagthisperson Plugin", function() {
|
|||
ok( "tagthisperson" in popped, "tagthisperson is a method of the popped instance" );
|
||||
plus();
|
||||
|
||||
equals( tagdiv.innerHTML, "", "initially, there is nothing inside the tagdiv" );
|
||||
equal( tagdiv.innerHTML, "", "initially, there is nothing inside the tagdiv" );
|
||||
plus();
|
||||
|
||||
popped.tagthisperson({
|
||||
|
@ -52,23 +52,23 @@ test( "Popcorn tagthisperson Plugin", function() {
|
|||
.volume( 0 );
|
||||
|
||||
popped.exec( 0, function() {
|
||||
equals( tagdiv.childElementCount, 2, "tagdiv now contains two child elements" );
|
||||
equal( tagdiv.childElementCount, 2, "tagdiv now contains two child elements" );
|
||||
plus();
|
||||
equals( tagdiv.textContent.trim() , "Anna Sob" ,"tagdiv shows the first tag" );
|
||||
equal( tagdiv.textContent.trim() , "Anna Sob" ,"tagdiv shows the first tag" );
|
||||
plus();
|
||||
});
|
||||
|
||||
popped.exec( 1, function() {
|
||||
equals( tagdiv.innerHTML.search( "<a href" ) , 1 ,"second tag in tagdiv has a url" );
|
||||
equal( tagdiv.innerHTML.search( "<a href" ) , 1 ,"second tag in tagdiv has a url" );
|
||||
plus();
|
||||
equals( tagdiv2.textContent.trim(), "Mike, Daniel" ,"tagdiv2 shows the first & second tag" );
|
||||
equal( tagdiv2.textContent.trim(), "Mike, Daniel" ,"tagdiv2 shows the first & second tag" );
|
||||
plus();
|
||||
});
|
||||
|
||||
popped.exec( 2, function() {
|
||||
equals( tagdiv.innerHTML , "" ,"tagdiv is now cleared" );
|
||||
equal( tagdiv.innerHTML , "" ,"tagdiv is now cleared" );
|
||||
plus();
|
||||
equals( tagdiv2.innerHTML , "" ,"tagdiv2 is now cleared" );
|
||||
equal( tagdiv2.innerHTML , "" ,"tagdiv2 is now cleared" );
|
||||
plus();
|
||||
});
|
||||
|
||||
|
|
|
@ -20,9 +20,9 @@ test( "Popcorn Timeline Plugin", function() {
|
|||
|
||||
ok( "timeline" in popped, "timeline is a method of the popped instance" );
|
||||
plus();
|
||||
equals( document.getElementById( "timeline-up" ).firstChild, undefined, "initially, there is nothing inside the 'timeline-up' feed" );
|
||||
equal( document.getElementById( "timeline-up" ).firstChild, undefined, "initially, there is nothing inside the 'timeline-up' feed" );
|
||||
plus();
|
||||
equals( document.getElementById( "timeline-down" ).firstChild, undefined, "initially, there is nothing inside the 'timeline-down' feed" );
|
||||
equal( document.getElementById( "timeline-down" ).firstChild, undefined, "initially, there is nothing inside the 'timeline-down' feed" );
|
||||
plus();
|
||||
|
||||
popped.timeline({
|
||||
|
@ -69,13 +69,13 @@ test( "Popcorn Timeline Plugin", function() {
|
|||
//up
|
||||
ok( document.getElementById( "timelineDiv1" ), "First timeline is on the page" );
|
||||
plus();
|
||||
equals( document.getElementById("timelineDiv1" ).parentNode.parentNode.id, "timeline-up", "First timeline is inside the 'timeline-up' div" );
|
||||
equal( document.getElementById("timelineDiv1" ).parentNode.parentNode.id, "timeline-up", "First timeline is inside the 'timeline-up' div" );
|
||||
plus();
|
||||
|
||||
//down
|
||||
ok( document.getElementById( "timelineDiv3" ), "First timeline is on the page" );
|
||||
plus();
|
||||
equals( document.getElementById("timelineDiv3" ).parentNode.parentNode.id, "timeline-down", "First Timeline is inside the 'timeline-down' div" );
|
||||
equal( document.getElementById("timelineDiv3" ).parentNode.parentNode.id, "timeline-down", "First Timeline is inside the 'timeline-down' div" );
|
||||
plus();
|
||||
|
||||
});
|
||||
|
@ -85,18 +85,18 @@ test( "Popcorn Timeline Plugin", function() {
|
|||
timelinediv4 = document.getElementById( "timelineDiv4" );
|
||||
ok( timelinediv2, "Second timeline is on the page" );
|
||||
plus();
|
||||
equals( timelinediv2 && timelinediv2.parentNode.parentNode.id, "timeline-up", "Second timelineDiv2 is inside the 'timeline-up' div" );
|
||||
equal( timelinediv2 && timelinediv2.parentNode.parentNode.id, "timeline-up", "Second timelineDiv2 is inside the 'timeline-up' div" );
|
||||
plus();
|
||||
equals( timelineUp.firstChild.firstChild.id, "timelineDiv2", "'timelineDiv2' is the first child in 'timeline-up'" );
|
||||
equal( timelineUp.firstChild.firstChild.id, "timelineDiv2", "'timelineDiv2' is the first child in 'timeline-up'" );
|
||||
plus();
|
||||
|
||||
//down
|
||||
|
||||
ok( timelinediv4, "Second down timeline is on the page" );
|
||||
plus();
|
||||
equals( timelinediv4.parentNode.parentNode.id, "timeline-down", "timelineDiv4 is inside the 'timeline-down' div" );
|
||||
equal( timelinediv4.parentNode.parentNode.id, "timeline-down", "timelineDiv4 is inside the 'timeline-down' div" );
|
||||
plus();
|
||||
equals( timelineDown.firstChild.firstChild.id, "timelineDiv3", "'timelineDiv3' is the first child in 'timeline-down'" );
|
||||
equal( timelineDown.firstChild.firstChild.id, "timelineDiv3", "'timelineDiv3' is the first child in 'timeline-down'" );
|
||||
plus();
|
||||
});
|
||||
popped.exec( 4, function() {
|
||||
|
@ -122,9 +122,9 @@ test( "Popcorn Timeline Plugin", function() {
|
|||
}
|
||||
|
||||
popped.pause();
|
||||
equals( document.getElementById( "timeline-up" ).firstChild, null, "removed timeline was properly destroyed" );
|
||||
equal( document.getElementById( "timeline-up" ).firstChild, null, "removed timeline was properly destroyed" );
|
||||
plus();
|
||||
equals( document.getElementById( "timeline-down" ).firstChild, null, "removed timeline was properly destroyed" );
|
||||
equal( document.getElementById( "timeline-down" ).firstChild, null, "removed timeline was properly destroyed" );
|
||||
plus();
|
||||
});
|
||||
|
||||
|
|
|
@ -91,7 +91,7 @@ test( "Popcorn Tumblr Plugin", function () {
|
|||
|
||||
popped.exec( 3, function() {
|
||||
// Checks display style is set correctly on startup
|
||||
equals( textblogdiv.style.display , "", "textblogdiv is visible on the page with '' display style" );
|
||||
equal( textblogdiv.style.display , "", "textblogdiv is visible on the page with '' display style" );
|
||||
plus();
|
||||
});
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ test( "Popcorn Twitter Plugin", function() {
|
|||
ok( "twitter" in popped, "twitter is a method of the popped instance" );
|
||||
plus();
|
||||
|
||||
equals ( twitterdiv.innerHTML, "", "initially, there is nothing inside the twitterdiv" );
|
||||
equal( twitterdiv.innerHTML, "", "initially, there is nothing inside the twitterdiv" );
|
||||
plus();
|
||||
|
||||
try {
|
||||
|
|
|
@ -18,7 +18,7 @@ test( "Popcorn wikipedia Plugin", function() {
|
|||
ok( "wikipedia" in popped, "wikipedia is a mehtod of the popped instance" );
|
||||
plus();
|
||||
|
||||
equals( theArticle.innerHTML, "", "initially, there is nothing in the wikidiv" );
|
||||
equal( theArticle.innerHTML, "", "initially, there is nothing in the wikidiv" );
|
||||
plus();
|
||||
|
||||
popped.wikipedia({
|
||||
|
@ -42,37 +42,37 @@ test( "Popcorn wikipedia Plugin", function() {
|
|||
popped.exec( 2, function() {
|
||||
notEqual( theArticle.innerHTML, "", "wikidiv now contains information" );
|
||||
plus();
|
||||
equals( theArticle.childElementCount, 2, "wikidiv now contains two child elements" );
|
||||
equal( theArticle.childElementCount, 2, "wikidiv now contains two child elements" );
|
||||
plus();
|
||||
equals( theArticle.children[ 0 ].innerHTML, "this is an article", "wikidiv has the right title" );
|
||||
equal( theArticle.children[ 0 ].innerHTML, "this is an article", "wikidiv has the right title" );
|
||||
plus();
|
||||
notEqual( theArticle.children[ 1 ].innerHTML, "", "wikidiv has some content" );
|
||||
plus();
|
||||
// subtract 1 from length for the '...' added in by the plugin
|
||||
equals( theArticle.children[ 1 ].innerHTML.split( " " ).length -1, 22, "wikidiv contains 22 words" );
|
||||
equal( theArticle.children[ 1 ].innerHTML.split( " " ).length -1, 22, "wikidiv contains 22 words" );
|
||||
plus();
|
||||
});
|
||||
|
||||
popped.exec( 3, function() {
|
||||
equals( theArticle.innerHTML, "", "wikidiv was cleared properly" );
|
||||
equal( theArticle.innerHTML, "", "wikidiv was cleared properly" );
|
||||
plus();
|
||||
});
|
||||
|
||||
popped.exec( 4, function() {
|
||||
notEqual( theArticle.innerHTML, "", "wikidiv now contains information" );
|
||||
plus();
|
||||
equals( theArticle.childElementCount, 2, "wikidiv now contains two child elements" );
|
||||
equal( theArticle.childElementCount, 2, "wikidiv now contains two child elements" );
|
||||
plus();
|
||||
notEqual( theArticle.children[ 1 ].innerHTML, "", "wikidiv has the right content" );
|
||||
plus();
|
||||
// subtract 1 from length for the '...' added in by the plugin
|
||||
equals( theArticle.children[ 1 ].innerHTML.split(" ").length - 1, 43, "wikidiv contains 43 words" );
|
||||
equal( theArticle.children[ 1 ].innerHTML.split(" ").length - 1, 43, "wikidiv contains 43 words" );
|
||||
plus();
|
||||
});
|
||||
|
||||
popped.exec( 6, function() {
|
||||
popped.pause().removeTrackEvent( popped.data.trackEvents.byStart[ 4 ]._id );
|
||||
equals( theArticle.innerHTML, "", "wikidiv is now empty" );
|
||||
equal( theArticle.innerHTML, "", "wikidiv is now empty" );
|
||||
plus();
|
||||
});
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ test( "Popcorn wordriver Plugin", function() {
|
|||
ok( "wordriver" in popped, "wordriver is a method of the popped instance" );
|
||||
plus();
|
||||
|
||||
equals( wordriverdiv.childElementCount, 0, "initially, there is nothing inside the wordriverdiv" );
|
||||
equal( wordriverdiv.childElementCount, 0, "initially, there is nothing inside the wordriverdiv" );
|
||||
plus();
|
||||
|
||||
popped.wordriver({
|
||||
|
@ -53,43 +53,43 @@ test( "Popcorn wordriver Plugin", function() {
|
|||
.volume( 0 );
|
||||
|
||||
popped.exec( 0, function() {
|
||||
equals( wordriverdiv.children[ 0 ].childElementCount, 1, "wordriverdiv now has one inner element" );
|
||||
equal( wordriverdiv.children[ 0 ].childElementCount, 1, "wordriverdiv now has one inner element" );
|
||||
plus();
|
||||
equals( wordriverdiv.children[ 0 ].children[ 0 ].style.opacity, 1, "first word is visible on the page" );
|
||||
equal( wordriverdiv.children[ 0 ].children[ 0 ].style.opacity, 1, "first word is visible on the page" );
|
||||
plus();
|
||||
equals( wordriverdiv.children[ 0 ].children[ 0 ].innerHTML, "hello", "first word content is correct" );
|
||||
equal( wordriverdiv.children[ 0 ].children[ 0 ].innerHTML, "hello", "first word content is correct" );
|
||||
plus();
|
||||
ok( !wordriverdiv.children[ 0 ].children[ 1 ], "second word does not exist yet" );
|
||||
plus();
|
||||
});
|
||||
|
||||
popped.exec( 2, function() {
|
||||
equals( wordriverdiv.children[ 0 ].childElementCount, 2, "wordriverdiv now has two inner elements" );
|
||||
equal( wordriverdiv.children[ 0 ].childElementCount, 2, "wordriverdiv now has two inner elements" );
|
||||
plus();
|
||||
equals( wordriverdiv.children[ 0 ].children[ 0 ].style.opacity, 0, "first word is not visible on the page" );
|
||||
equal( wordriverdiv.children[ 0 ].children[ 0 ].style.opacity, 0, "first word is not visible on the page" );
|
||||
plus();
|
||||
equals( wordriverdiv.children[ 0 ].children[ 0 ].innerHTML, "hello", "first word content is correct" );
|
||||
equal( wordriverdiv.children[ 0 ].children[ 0 ].innerHTML, "hello", "first word content is correct" );
|
||||
plus();
|
||||
equals( wordriverdiv.children[ 0 ].children[ 1 ].style.opacity, 1, "second word is visible on the page" );
|
||||
equal( wordriverdiv.children[ 0 ].children[ 1 ].style.opacity, 1, "second word is visible on the page" );
|
||||
plus();
|
||||
equals( wordriverdiv.children[ 0 ].children[ 1 ].innerHTML, "world", "second word content is correct" );
|
||||
equal( wordriverdiv.children[ 0 ].children[ 1 ].innerHTML, "world", "second word content is correct" );
|
||||
plus();
|
||||
});
|
||||
|
||||
popped.exec( 4, function() {
|
||||
equals( wordriverdiv.children[ 0 ].children[ 0 ].style.opacity, 0, "first word is not visible on the page" );
|
||||
equal( wordriverdiv.children[ 0 ].children[ 0 ].style.opacity, 0, "first word is not visible on the page" );
|
||||
plus();
|
||||
equals( wordriverdiv.children[ 0 ].children[ 1 ].style.opacity, 0, "second word is not visible on the page" );
|
||||
equal( wordriverdiv.children[ 0 ].children[ 1 ].style.opacity, 0, "second word is not visible on the page" );
|
||||
plus();
|
||||
|
||||
popped.pause().removeTrackEvent( firstTrack );
|
||||
equals( wordriverdiv.children[ 0 ].childElementCount, 1, "wordriverdiv now has one inner element" );
|
||||
equal( wordriverdiv.children[ 0 ].childElementCount, 1, "wordriverdiv now has one inner element" );
|
||||
plus();
|
||||
equals( wordriverdiv.children[ 0 ].children[ 0 ].innerHTML, "world", "first word content is changed" );
|
||||
equal( wordriverdiv.children[ 0 ].children[ 0 ].innerHTML, "world", "first word content is changed" );
|
||||
plus();
|
||||
|
||||
popped.pause().removeTrackEvent( secondTrack );
|
||||
equals( wordriverdiv.childElementCount, 0, "wordriverdiv now has no inner element, even though one still exists, but was never called" );
|
||||
equal( wordriverdiv.childElementCount, 0, "wordriverdiv now has no inner element, even though one still exists, but was never called" );
|
||||
plus();
|
||||
});
|
||||
|
||||
|
|
|
@ -39,8 +39,8 @@ var tests = [
|
|||
test: function() {
|
||||
expect(2);
|
||||
var results = Popcorn.getTrackEvents(popcorn);
|
||||
equals(results[0].start, 1, 'start is 1');
|
||||
equals(results[0].end, 2, 'end is 2');
|
||||
equal(results[0].start, 1, 'start is 1');
|
||||
equal(results[0].end, 2, 'end is 2');
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -64,7 +64,7 @@ var tests = [
|
|||
{
|
||||
title: 'p[validPluginName] is expected plugin',
|
||||
test: function() {
|
||||
equals(popcorn['test'],plugin['test'], 'popcorn[\'test\'] == plugin[\'test\']');
|
||||
equal(popcorn['test'],plugin['test'], 'popcorn[\'test\'] == plugin[\'test\']');
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -72,13 +72,13 @@ var tests = [
|
|||
test: function() {
|
||||
expect(2);
|
||||
ok(Popcorn.registry, 'registry exists');
|
||||
equals(typeof(Popcorn.registry), 'object', 'Popcorn.registry is an object');
|
||||
equal(typeof(Popcorn.registry), 'object', 'Popcorn.registry is an object');
|
||||
}
|
||||
},
|
||||
{
|
||||
title: 'Popcorn.registry must contain plugins',
|
||||
test: function() {
|
||||
equals(Popcorn.registry[0], plugin, 'Popcorn.registry contains test plugin');
|
||||
equal(Popcorn.registry[0], plugin, 'Popcorn.registry contains test plugin');
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -104,13 +104,13 @@ var tests = [
|
|||
test: function() {
|
||||
expect(2);
|
||||
ok(Popcorn.manifest, 'Popcorn.manifest exists');
|
||||
equals(typeof(Popcorn.manifest), 'object', 'Popcorn.manifest is an object');
|
||||
equal(typeof(Popcorn.manifest), 'object', 'Popcorn.manifest is an object');
|
||||
}
|
||||
},
|
||||
{
|
||||
title: 'Popcorn.manifest must contain plugin manifests',
|
||||
test: function() {
|
||||
equals(Popcorn.manifest['test'], manifest);
|
||||
equal(Popcorn.manifest['test'], manifest);
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -184,7 +184,7 @@ var tests = [
|
|||
test: function() {
|
||||
expect(2);
|
||||
ok(popcorn.data.history, 'history exists');
|
||||
equals(typeof(popcorn.data.history), 'object', 'history in an object');
|
||||
equal(typeof(popcorn.data.history), 'object', 'history in an object');
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -209,8 +209,8 @@ var tests = [
|
|||
expect(2);
|
||||
var tracks1 = popcorn.getTrackEvents();
|
||||
var tracks2 = Popcorn.getTrackEvents(popcorn);
|
||||
equals(tracks1.length, tracks2.length, 'lengths are equal');
|
||||
equals(tracks1[0], tracks2[0], 'objects are equal');
|
||||
equal(tracks1.length, tracks2.length, 'lengths are equal');
|
||||
equal(tracks1[0], tracks2[0], 'objects are equal');
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -231,7 +231,7 @@ var tests = [
|
|||
expect(2);
|
||||
ok(popcorn.removeTrackEvent, 'exists');
|
||||
popcorn.removeTrackEvent(popcorn.getLastTrackEventId());
|
||||
equals(popcorn.getTrackEvents().length, 0, 'works');
|
||||
equal(popcorn.getTrackEvents().length, 0, 'works');
|
||||
}
|
||||
},
|
||||
];
|
||||
|
|
Загрузка…
Ссылка в новой задаче