Added test case for tile-drawing event.

This commit is contained in:
Grant Echols 2014-03-03 16:19:40 -07:00
parent be79249c9c
commit 27424348f3

View File

@ -280,4 +280,23 @@
viewer.open( '/test/data/testpattern.dzi' );
} );
// ----------
asyncTest( 'tile-drawing event', function () {
var tileDrawing = function ( event ) {
viewer.removeHandler( 'tile-drawing', tileDrawing );
ok( event, 'Event handler received event data' );
if ( event ) {
// Make sure we have the expected elements set
ok(event.context, "Context is not set");
ok(event.tile, "Tile is not set");
ok(event.rendered, "Rendered is not set");
}
viewer.close();
start();
};
viewer.addHandler( 'tile-drawing', tileDrawing );
viewer.open( '/test/data/testpattern.dzi' );
} );
} )();