Run tests in real browsers with Karma
This commit is contained in:
@@ -3334,7 +3334,7 @@ describe('ol.format.KML', function() {
|
||||
var nl = format.readNetworkLinks(text);
|
||||
expect(nl).to.have.length(2);
|
||||
expect(nl[0].name).to.be('bar');
|
||||
expect(nl[0].href.replace(window.location.href, '')).to.be('bar/bar.kml');
|
||||
expect(nl[0].href.replace(window.location.origin, '')).to.be('/bar/bar.kml');
|
||||
expect(nl[1].href).to.be('http://foo.com/foo.kml');
|
||||
});
|
||||
|
||||
|
||||
BIN
test/spec/ol/source/images/zoomify/TileGroup0/0-0-0.jpg
Normal file
BIN
test/spec/ol/source/images/zoomify/TileGroup0/0-0-0.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.1 KiB |
@@ -11,7 +11,7 @@ describe('ol.source.Zoomify', function() {
|
||||
var w = 1024;
|
||||
var h = 512;
|
||||
var size = [w, h];
|
||||
var url = 'zoomify-url/{TileGroup}/{z}-{x}-{y}.jpg';
|
||||
var url = 'spec/ol/source/images/zoomify/{TileGroup}/{z}-{x}-{y}.jpg';
|
||||
var proj = new ol.proj.Projection({
|
||||
code: 'ZOOMIFY',
|
||||
units: 'pixels',
|
||||
@@ -171,27 +171,27 @@ describe('ol.source.Zoomify', function() {
|
||||
var source = getZoomifySource();
|
||||
var tileUrlFunction = source.getTileUrlFunction();
|
||||
// zoomlevel 0
|
||||
expect(tileUrlFunction([0, 0, -1])).to.eql('zoomify-url/TileGroup0/0-0-0.jpg');
|
||||
expect(tileUrlFunction([0, 0, -1])).to.eql('spec/ol/source/images/zoomify/TileGroup0/0-0-0.jpg');
|
||||
// zoomlevel 1
|
||||
expect(tileUrlFunction([1, 0, -1])).to.eql('zoomify-url/TileGroup0/1-0-0.jpg');
|
||||
expect(tileUrlFunction([1, 1, -1])).to.eql('zoomify-url/TileGroup0/1-1-0.jpg');
|
||||
expect(tileUrlFunction([1, 0, -2])).to.eql('zoomify-url/TileGroup0/1-0-1.jpg');
|
||||
expect(tileUrlFunction([1, 1, -2])).to.eql('zoomify-url/TileGroup0/1-1-1.jpg');
|
||||
expect(tileUrlFunction([1, 0, -1])).to.eql('spec/ol/source/images/zoomify/TileGroup0/1-0-0.jpg');
|
||||
expect(tileUrlFunction([1, 1, -1])).to.eql('spec/ol/source/images/zoomify/TileGroup0/1-1-0.jpg');
|
||||
expect(tileUrlFunction([1, 0, -2])).to.eql('spec/ol/source/images/zoomify/TileGroup0/1-0-1.jpg');
|
||||
expect(tileUrlFunction([1, 1, -2])).to.eql('spec/ol/source/images/zoomify/TileGroup0/1-1-1.jpg');
|
||||
});
|
||||
|
||||
it('creates an expected tileUrlFunction without template', function() {
|
||||
var source = new ol.source.Zoomify({
|
||||
url: 'zoomify-url/',
|
||||
url: 'spec/ol/source/images/zoomify/',
|
||||
size: size
|
||||
});
|
||||
var tileUrlFunction = source.getTileUrlFunction();
|
||||
// zoomlevel 0
|
||||
expect(tileUrlFunction([0, 0, -1])).to.eql('zoomify-url/TileGroup0/0-0-0.jpg');
|
||||
expect(tileUrlFunction([0, 0, -1])).to.eql('spec/ol/source/images/zoomify/TileGroup0/0-0-0.jpg');
|
||||
// zoomlevel 1
|
||||
expect(tileUrlFunction([1, 0, -1])).to.eql('zoomify-url/TileGroup0/1-0-0.jpg');
|
||||
expect(tileUrlFunction([1, 1, -1])).to.eql('zoomify-url/TileGroup0/1-1-0.jpg');
|
||||
expect(tileUrlFunction([1, 0, -2])).to.eql('zoomify-url/TileGroup0/1-0-1.jpg');
|
||||
expect(tileUrlFunction([1, 1, -2])).to.eql('zoomify-url/TileGroup0/1-1-1.jpg');
|
||||
expect(tileUrlFunction([1, 0, -1])).to.eql('spec/ol/source/images/zoomify/TileGroup0/1-0-0.jpg');
|
||||
expect(tileUrlFunction([1, 1, -1])).to.eql('spec/ol/source/images/zoomify/TileGroup0/1-1-0.jpg');
|
||||
expect(tileUrlFunction([1, 0, -2])).to.eql('spec/ol/source/images/zoomify/TileGroup0/1-0-1.jpg');
|
||||
expect(tileUrlFunction([1, 1, -2])).to.eql('spec/ol/source/images/zoomify/TileGroup0/1-1-1.jpg');
|
||||
});
|
||||
it('returns undefined if no tileCoord passed', function() {
|
||||
var source = getZoomifySource();
|
||||
|
||||
Reference in New Issue
Block a user