From e436fc93fd2e66c1fe2687d4c41faf7a2b4fee66 Mon Sep 17 00:00:00 2001 From: Antoine Vandecreme Date: Sat, 9 Apr 2016 11:23:59 -0400 Subject: [PATCH] Fix test. --- test/modules/tiledimage.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/test/modules/tiledimage.js b/test/modules/tiledimage.js index 405f0dfc..49cd71d8 100644 --- a/test/modules/tiledimage.js +++ b/test/modules/tiledimage.js @@ -207,8 +207,17 @@ Util.spyOnce(viewer.drawer, 'setClip', function(rect) { var homeBounds = viewer.viewport.getHomeBounds(); - var canvasClip = viewer.viewport.viewportToViewerElementRectangle(homeBounds); - propEqual(rect, canvasClip, 'clipping to correct rect'); + var canvasClip = viewer.viewport + .viewportToViewerElementRectangle(homeBounds); + var precision = 0.00000001; + Util.assessNumericValue(rect.x, canvasClip.x, precision, + 'clipping x should be ' + canvasClip.x); + Util.assessNumericValue(rect.y, canvasClip.y, precision, + 'clipping y should be ' + canvasClip.y); + Util.assessNumericValue(rect.width, canvasClip.width, precision, + 'clipping width should be ' + canvasClip.width); + Util.assessNumericValue(rect.height, canvasClip.height, precision, + 'clipping height should be ' + canvasClip.height); start(); }); });