From 20711c485b1c96d7c848023b66b68a7d8ed79d59 Mon Sep 17 00:00:00 2001 From: nein09 Date: Thu, 13 Nov 2014 17:19:36 -0800 Subject: [PATCH] getContainerSize test --- test/viewport.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/test/viewport.js b/test/viewport.js index 679ac3cf..4df19bbf 100644 --- a/test/viewport.js +++ b/test/viewport.js @@ -63,6 +63,19 @@ viewer.open(DZI_PATH); }); */ + asyncTest('getContainerSize', function() { + var openHandler = function(event) { + viewer.removeHandler('open', openHandler); + var viewport = viewer.viewport; + viewport.zoomTo(ZOOM_FACTOR, null, true); + + propEqual(viewport.getContainerSize(), new OpenSeadragon.Point(500, 500), "Test container size") + start(); + }; + viewer.addHandler('open', openHandler); + viewer.open(DZI_PATH); + }); + asyncTest('getAspectRatio', function() { var openHandler = function(event) { viewer.removeHandler('open', openHandler);