Skip to content
This repository has been archived by the owner on Jun 29, 2018. It is now read-only.

Commit

Permalink
Rename Qunit.equals() to Qunit.equal() for non-core tests [#231]
Browse files Browse the repository at this point in the history
  • Loading branch information
jbuck committed Mar 7, 2012
1 parent 4196910 commit 29e4984
Show file tree
Hide file tree
Showing 36 changed files with 211 additions and 211 deletions.
8 changes: 4 additions & 4 deletions modules/player/popcorn.player.unit.js
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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();

});
6 changes: 3 additions & 3 deletions modules/timeline-sources/popcorn.timeline-sources.unit.js
Expand Up @@ -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();

});
Expand Down
10 changes: 5 additions & 5 deletions parsers/parserJSON/popcorn.parserJSON.unit.js
Expand Up @@ -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++;
});
Expand All @@ -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();
Expand Down
8 changes: 4 additions & 4 deletions parsers/parserSBV/popcorn.parserSBV.unit.js
Expand Up @@ -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();
});
});
10 changes: 5 additions & 5 deletions parsers/parserSRT/popcorn.parserSRT.unit.js
Expand Up @@ -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);
Expand Down
8 changes: 4 additions & 4 deletions parsers/parserSSA/popcorn.parserSSA.unit.js
Expand Up @@ -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);
Expand Down
8 changes: 4 additions & 4 deletions parsers/parserTTXT/popcorn.parserTTXT.unit.js
Expand Up @@ -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);
});
2 changes: 1 addition & 1 deletion parsers/parserVTT/popcorn.parserVTT.unit.js
Expand Up @@ -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);
Expand Down
24 changes: 12 additions & 12 deletions players/soundcloud/popcorn.soundcloud.unit.js
Expand Up @@ -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();
});

Expand All @@ -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();
});

Expand Down Expand Up @@ -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 ) {
Expand Down Expand Up @@ -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();
});
});
Expand Down Expand Up @@ -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();
});

Expand Down Expand Up @@ -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();
Expand All @@ -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();
});

Expand Down Expand Up @@ -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();
});

Expand Down
14 changes: 7 additions & 7 deletions players/vimeo/popcorn.vimeo.unit.js
Expand Up @@ -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({
Expand Down Expand Up @@ -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({
Expand Down Expand Up @@ -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() {
Expand Down Expand Up @@ -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++;
Expand Down Expand Up @@ -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();
});

Expand Down
14 changes: 7 additions & 7 deletions players/youtube/popcorn.youtube.unit.js
Expand Up @@ -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({
Expand Down Expand Up @@ -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({
Expand Down Expand Up @@ -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() {
Expand All @@ -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();
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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();
};

Expand Down

0 comments on commit 29e4984

Please sign in to comment.