Update tests
authorMichael Ang <mang@archive.org>
Thu, 26 May 2011 00:06:55 +0000 (00:06 +0000)
committerMichael Ang <mang@archive.org>
Thu, 26 May 2011 00:06:55 +0000 (00:06 +0000)
BookReaderIA/test/unit/Images.js
BookReaderIA/test/unit/Permalinks.js

index 40b928d..85cb92f 100644 (file)
@@ -262,6 +262,22 @@ asyncTest('Load cover, fitting within 100x400', function() {
 });
 
 
+asyncTest('Load cover, fitting within 0.25x0.25 (weird but valid)', function() {
+    expect(3);
+    var pageURI = testHost() + '/download/mechanicstheor00loverich/page/cover_w0.25_h0.25.jpg';
+    
+    var img = new Image();
+    $(img).bind( 'load error', function(eventObj) {
+        equals(eventObj.type, 'load', 'Load image (' + pageURI + '). Event handler called');
+        equals(this.width, 1053, 'Image width');
+        equals(this.height, 1946, '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() {
index 73a55e6..0a08b92 100644 (file)
@@ -58,7 +58,7 @@ test("Permalink format - /download/{itemid}/page/{page specifier}.jpg", function
 
 (function() {
     var itemId = 'nasa_techdoc_20050157919';
-    var page = 'n20_thumb_rotate90.jpg';
+    var page = 'n20_thumb_rot90.jpg';
     var subPrefix = '20050157919';
     
     asyncTest("Rotated thumbnail - Page " + page + " from " + itemId + '/' + subPrefix, function() {