Signed-off-by: Rick Waldron waldron.rick@gmail.com <waldron.rick@gmail.com>
This commit is contained in:
Rick Waldron waldron.rick@gmail.com 2012-03-27 14:24:10 -04:00
Родитель 8f7f564e55
Коммит 104ca77130
1 изменённых файлов: 22 добавлений и 2 удалений

Просмотреть файл

@ -1,10 +1,11 @@
test( "Popcorn Code Plugin", function() {
var popped = Popcorn( "#video" ),
expects = 9,
expects = 12,
count = 0,
frames = 0,
codeDiv = document.getElementById( "code-div" );
codeDiv = document.getElementById( "code-div" ),
hasCheckedFrame = false;
expect( expects );
@ -22,6 +23,19 @@ test( "Popcorn Code Plugin", function() {
equal( codeDiv.innerHTML, "", "initially, there is nothing inside the code-div" );
plus();
popped.code({
start: 0,
end: 2,
onStart: function( options ) {
ok( this instanceof Popcorn, "this instanceof Popcorn, onStart" );
plus();
},
onEnd: function( options ) {
ok( this instanceof Popcorn, "this instanceof Popcorn, onEnd" );
plus();
}
});
popped.code({
start: 0,
end: 2,
@ -56,6 +70,12 @@ test( "Popcorn Code Plugin", function() {
plus();
},
onFrame: function ( options ) {
if ( !hasCheckedFrame ) {
hasCheckedFrame = true;
ok( this instanceof Popcorn, "this instanceof Popcorn, onFrame" );
plus();
}
codeDiv.innerHTML += ".";
frames++;
},