Skip to content

Commit

Permalink
Merge remote-tracking branch 'ScottDowne/t562' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
jbuck committed Jun 15, 2011
2 parents 67c5c51 + 6a24a9b commit 3a86093
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion plugins/wordriver/popcorn.wordriver.js
Expand Up @@ -131,7 +131,7 @@
_teardown: function( options ) {

// removes word span from generated container
options._container.removeChild( options.word );
options.word.parentNode && options._container.removeChild( options.word );

// if no more word spans exist in container, remove container
container[ options.target ] &&
Expand Down
14 changes: 11 additions & 3 deletions plugins/wordriver/popcorn.wordriver.unit.js
Expand Up @@ -40,11 +40,19 @@ test( "Popcorn wordriver Plugin", function () {
text: "world",
target: "wordriverdiv",
color: "blue"
})
.volume(0);
});

secondTrack = popped.getLastTrackEventId();

popped.wordriver({
start: 20, // seconds
end: 24, // seconds
text: "nothing here",
target: "wordriverdiv",
color: "green"
})
.volume(0);

popped.exec( 0, function() {
equals( wordriverdiv.children[0].childElementCount, 1, "wordriverdiv now has one inner element" );
plus();
Expand Down Expand Up @@ -82,7 +90,7 @@ test( "Popcorn wordriver Plugin", function () {
plus();

popped.pause().removeTrackEvent( secondTrack );
equals( wordriverdiv.childElementCount, 0, "wordriverdiv now has no inner element" );
equals( wordriverdiv.childElementCount, 0, "wordriverdiv now has no inner element, even though one still exists, but was never called" );
plus();
});

Expand Down

0 comments on commit 3a86093

Please sign in to comment.