From 27424348f34fc57636aea04bf98416f0344bcceb Mon Sep 17 00:00:00 2001 From: Grant Echols Date: Mon, 3 Mar 2014 16:19:40 -0700 Subject: [PATCH] Added test case for tile-drawing event. --- test/events.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/test/events.js b/test/events.js index 6fb7f23c..c5480837 100644 --- a/test/events.js +++ b/test/events.js @@ -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' ); + } ); + } )();