From 8880353ce9f269df4d51e69964f1cf10c857e0f0 Mon Sep 17 00:00:00 2001 From: Michael Ang Date: Wed, 25 May 2011 00:26:09 +0000 Subject: [PATCH] Another image test --- BookReaderIA/test/unit/Images.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/BookReaderIA/test/unit/Images.js b/BookReaderIA/test/unit/Images.js index 33a2511..d740cf0 100644 --- a/BookReaderIA/test/unit/Images.js +++ b/BookReaderIA/test/unit/Images.js @@ -185,6 +185,21 @@ asyncTest('Load jpg image from tar file - https://bugs.launchpad.net/bookreader/ .attr('src', pageURI); }); +asyncTest('Load image region using /download URL - populationsc18400378unit/page/n800_x1544_y4144_w1192_h848_s4.jpg', function() { + expect(3); + var pageURI = testHost() + '/download/populationsc18400378unit/page/n800_x1544_y4144_w1192_h848_s4.jpg'; + + var img = new Image(); + $(img).bind( 'load error', function(eventObj) { + equals(eventObj.type, 'load', 'Load image (' + pageURI + '). Event handler called'); + equals(this.width, 299, 'Image width'); + equals(this.height, 212, 'Image height'); + start(); + }) + .attr('src', pageURI); + +}); + asyncTest('Load image region from tiff, via br.getRegionURI - fightingflyingc00rickgoog - n17_x1944_y1708_w668_h584', function() { $.getScript( jsLocateURL('fightingflyingc00rickgoog'), function() { -- 2.20.1