Fix tests

This commit is contained in:
Antoine Vandecreme 2016-11-02 22:35:23 +01:00
parent 10dd723637
commit 6370a6bafa
3 changed files with 6 additions and 5 deletions

View File

@ -347,7 +347,7 @@ $.TileSource.prototype = {
getTileAtPoint: function(level, point) {
var validPoint = point.x >= 0 && point.x <= 1 &&
point.y >= 0 && point.y <= 1 / this.aspectRatio;
$.console.assert(validPoint, "[TileSource.getTileAtPoint] called with invalid point " + point.toString());
$.console.assert(validPoint, "[TileSource.getTileAtPoint] must be called with a valid point.");
var widthScaled = this.dimensions.x * this.getLevelScale(level);
var pixelX = point.x * widthScaled;

View File

@ -32,6 +32,7 @@
<script src="/src/iiiftilesource.js"></script>
<script src="/src/osmtilesource.js"></script>
<script src="/src/tmstilesource.js"></script>
<script src="/src/zoomifytilesource.js"></script>
<script src="/src/legacytilesource.js"></script>
<script src="/src/imagetilesource.js"></script>
<script src="/src/tilesourcecollection.js"></script>

View File

@ -331,7 +331,7 @@
height: 155
} ]
} );
viewer.addHandler('tile-drawn', function() {
viewer.addOnceHandler('tile-drawn', function() {
ok(OpenSeadragon.isCanvasTainted(viewer.drawer.context.canvas),
"Canvas should be tainted.");
start();
@ -355,7 +355,7 @@
height: 155
} ]
} );
viewer.addHandler('tile-drawn', function() {
viewer.addOnceHandler('tile-drawn', function() {
ok(!OpenSeadragon.isCanvasTainted(viewer.drawer.context.canvas),
"Canvas should not be tainted.");
start();
@ -385,7 +385,7 @@
},
crossOriginPolicy : false
} );
viewer.addHandler('tile-drawn', function() {
viewer.addOnceHandler('tile-drawn', function() {
ok(OpenSeadragon.isCanvasTainted(viewer.drawer.context.canvas),
"Canvas should be tainted.");
start();
@ -414,7 +414,7 @@
crossOriginPolicy : "Anonymous"
}
} );
viewer.addHandler('tile-drawn', function() {
viewer.addOnceHandler('tile-drawn', function() {
ok(!OpenSeadragon.isCanvasTainted(viewer.drawer.context.canvas),
"Canvas should not be tainted.");
start();