Merge pull request #4475 from bartvde/ie-test-failures
Fix up failing tests in Internet Explorer
This commit is contained in:
@@ -30,6 +30,8 @@
|
|||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
goog.json.USE_NATIVE_JSON = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The goog.dom.ViewportSizeMonitor (used in map.js) creates a global leak
|
* The goog.dom.ViewportSizeMonitor (used in map.js) creates a global leak
|
||||||
* by setting goog.UID_PROPERTY_ on the monitored window. In order to test
|
* by setting goog.UID_PROPERTY_ on the monitored window. In order to test
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -291,7 +291,7 @@ describe('ol.format.EsriJSON', function() {
|
|||||||
it('parses ksfields.geojson', function(done) {
|
it('parses ksfields.geojson', function(done) {
|
||||||
afterLoadText('spec/ol/format/esrijson/ksfields.json', function(text) {
|
afterLoadText('spec/ol/format/esrijson/ksfields.json', function(text) {
|
||||||
var result = format.readFeatures(text);
|
var result = format.readFeatures(text);
|
||||||
expect(result.length).to.be(306);
|
expect(result.length).to.be(9);
|
||||||
|
|
||||||
var first = result[0];
|
var first = result[0];
|
||||||
expect(first).to.be.a(ol.Feature);
|
expect(first).to.be.a(ol.Feature);
|
||||||
@@ -304,15 +304,15 @@ describe('ol.format.EsriJSON', function() {
|
|||||||
-10579560.16462974, 4716567.373073828]))
|
-10579560.16462974, 4716567.373073828]))
|
||||||
.to.be(true);
|
.to.be(true);
|
||||||
|
|
||||||
var last = result[305];
|
var last = result[8];
|
||||||
expect(last).to.be.a(ol.Feature);
|
expect(last).to.be.a(ol.Feature);
|
||||||
expect(last.get('field_name')).to.be('PAOLA-RANTOUL');
|
expect(last.get('field_name')).to.be('FEAGINS');
|
||||||
expect(last.getId()).to.be(223);
|
expect(last.getId()).to.be(6030);
|
||||||
var lastGeom = last.getGeometry();
|
var lastGeom = last.getGeometry();
|
||||||
expect(lastGeom).to.be.a(ol.geom.Polygon);
|
expect(lastGeom).to.be.a(ol.geom.Polygon);
|
||||||
expect(ol.extent.equals(lastGeom.getExtent(),
|
expect(ol.extent.equals(lastGeom.getExtent(),
|
||||||
[-10596945.530910717, 4634530.860533288,
|
[-10555714.026858449, 4576511.565880965,
|
||||||
-10538217.991305258, 4691558.678837225]))
|
-10553671.199322715, 4578554.9934867555]))
|
||||||
.to.be(true);
|
.to.be(true);
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -567,10 +567,10 @@ describe('ol.format.GPX', function() {
|
|||||||
[[[0, 0], [2, 2], [4, 0], [0, 0]]]);
|
[[[0, 0], [2, 2], [4, 0], [0, 0]]]);
|
||||||
var feature = new ol.Feature(polygon);
|
var feature = new ol.Feature(polygon);
|
||||||
var features = [feature];
|
var features = [feature];
|
||||||
var gpx = format.writeFeatures(features);
|
var gpx = format.writeFeaturesNode(features);
|
||||||
var expected =
|
var expected =
|
||||||
'<gpx xmlns="http://www.topografix.com/GPX/1/1"/>';
|
'<gpx xmlns="http://www.topografix.com/GPX/1/1"/>';
|
||||||
expect(gpx).to.be(expected);
|
expect(gpx).to.xmleql(ol.xml.parse(expected));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
goog.provide('ol.test.format.MVT');
|
goog.provide('ol.test.format.MVT');
|
||||||
|
|
||||||
|
(typeof ArrayBuffer == 'function' ? describe : xdescribe)('ol.format.MVT',
|
||||||
describe('ol.format.MVT', function() {
|
function() {
|
||||||
|
|
||||||
var data;
|
var data;
|
||||||
beforeEach(function(done) {
|
beforeEach(function(done) {
|
||||||
|
|||||||
@@ -17,7 +17,8 @@ function itNoPhantom() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
describe('ol.source.Raster', function() {
|
(typeof ImageData == 'function' ? describe : xdescribe)('ol.source.Raster',
|
||||||
|
function() {
|
||||||
|
|
||||||
var target, map, redSource, greenSource, blueSource;
|
var target, map, redSource, greenSource, blueSource;
|
||||||
|
|
||||||
@@ -119,7 +120,8 @@ describe('ol.source.Raster', function() {
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
itNoPhantom('allows operation type to be set to "image"', function(done) {
|
itNoPhantom('allows operation type to be set to "image"',
|
||||||
|
function(done) {
|
||||||
|
|
||||||
var log = [];
|
var log = [];
|
||||||
|
|
||||||
|
|||||||
@@ -22,9 +22,11 @@ describe('ol.source.TileArcGISRest', function() {
|
|||||||
expect(uri.getDomain()).to.be('example.com');
|
expect(uri.getDomain()).to.be('example.com');
|
||||||
expect(uri.getPath()).to.be('/MapServer/export');
|
expect(uri.getPath()).to.be('/MapServer/export');
|
||||||
var queryData = uri.getQueryData();
|
var queryData = uri.getQueryData();
|
||||||
expect(queryData.get('BBOX')).to.be(
|
var bbox = queryData.get('BBOX').split(',').map(parseFloat);
|
||||||
'-10018754.171394622,-15028131.257091936,' +
|
expect(bbox[0]).roughlyEqual(-10018754.171394622, 1e-9);
|
||||||
'-5009377.085697311,-10018754.171394624');
|
expect(bbox[1]).roughlyEqual(-15028131.257091936, 1e-9);
|
||||||
|
expect(bbox[2]).roughlyEqual(-5009377.085697311, 1e-9);
|
||||||
|
expect(bbox[3]).roughlyEqual(-10018754.171394624, 1e-9);
|
||||||
expect(queryData.get('FORMAT')).to.be('PNG32');
|
expect(queryData.get('FORMAT')).to.be('PNG32');
|
||||||
expect(queryData.get('SIZE')).to.be('256,256');
|
expect(queryData.get('SIZE')).to.be('256,256');
|
||||||
expect(queryData.get('IMAGESR')).to.be('3857');
|
expect(queryData.get('IMAGESR')).to.be('3857');
|
||||||
@@ -54,9 +56,11 @@ describe('ol.source.TileArcGISRest', function() {
|
|||||||
expect(uri.getDomain()).to.match(/test[12]\.com/);
|
expect(uri.getDomain()).to.match(/test[12]\.com/);
|
||||||
expect(uri.getPath()).to.be('/MapServer/export');
|
expect(uri.getPath()).to.be('/MapServer/export');
|
||||||
var queryData = uri.getQueryData();
|
var queryData = uri.getQueryData();
|
||||||
expect(queryData.get('BBOX')).to.be(
|
var bbox = queryData.get('BBOX').split(',').map(parseFloat);
|
||||||
'-10018754.171394622,-15028131.257091936,' +
|
expect(bbox[0]).roughlyEqual(-10018754.171394622, 1e-9);
|
||||||
'-5009377.085697311,-10018754.171394624');
|
expect(bbox[1]).roughlyEqual(-15028131.257091936, 1e-9);
|
||||||
|
expect(bbox[2]).roughlyEqual(-5009377.085697311, 1e-9);
|
||||||
|
expect(bbox[3]).roughlyEqual(-10018754.171394624, 1e-9);
|
||||||
expect(queryData.get('FORMAT')).to.be('PNG32');
|
expect(queryData.get('FORMAT')).to.be('PNG32');
|
||||||
expect(queryData.get('SIZE')).to.be('256,256');
|
expect(queryData.get('SIZE')).to.be('256,256');
|
||||||
expect(queryData.get('IMAGESR')).to.be('3857');
|
expect(queryData.get('IMAGESR')).to.be('3857');
|
||||||
@@ -75,9 +79,11 @@ describe('ol.source.TileArcGISRest', function() {
|
|||||||
expect(uri.getDomain()).to.be('example.com');
|
expect(uri.getDomain()).to.be('example.com');
|
||||||
expect(uri.getPath()).to.be('/ImageServer/exportImage');
|
expect(uri.getPath()).to.be('/ImageServer/exportImage');
|
||||||
var queryData = uri.getQueryData();
|
var queryData = uri.getQueryData();
|
||||||
expect(queryData.get('BBOX')).to.be(
|
var bbox = queryData.get('BBOX').split(',').map(parseFloat);
|
||||||
'-10018754.171394622,-15028131.257091936,' +
|
expect(bbox[0]).roughlyEqual(-10018754.171394622, 1e-9);
|
||||||
'-5009377.085697311,-10018754.171394624');
|
expect(bbox[1]).roughlyEqual(-15028131.257091936, 1e-9);
|
||||||
|
expect(bbox[2]).roughlyEqual(-5009377.085697311, 1e-9);
|
||||||
|
expect(bbox[3]).roughlyEqual(-10018754.171394624, 1e-9);
|
||||||
expect(queryData.get('FORMAT')).to.be('PNG32');
|
expect(queryData.get('FORMAT')).to.be('PNG32');
|
||||||
expect(queryData.get('SIZE')).to.be('256,256');
|
expect(queryData.get('SIZE')).to.be('256,256');
|
||||||
expect(queryData.get('IMAGESR')).to.be('3857');
|
expect(queryData.get('IMAGESR')).to.be('3857');
|
||||||
|
|||||||
@@ -34,9 +34,11 @@ describe('ol.source.TileWMS', function() {
|
|||||||
expect(uri.getDomain()).to.be('example.com');
|
expect(uri.getDomain()).to.be('example.com');
|
||||||
expect(uri.getPath()).to.be('/wms');
|
expect(uri.getPath()).to.be('/wms');
|
||||||
var queryData = uri.getQueryData();
|
var queryData = uri.getQueryData();
|
||||||
expect(queryData.get('BBOX')).to.be(
|
var bbox = queryData.get('BBOX').split(',').map(parseFloat);
|
||||||
'-10018754.171394622,-15028131.257091936,' +
|
expect(bbox[0]).roughlyEqual(-10018754.171394622, 1e-9);
|
||||||
'-5009377.085697311,-10018754.171394624');
|
expect(bbox[1]).roughlyEqual(-15028131.257091936, 1e-9);
|
||||||
|
expect(bbox[2]).roughlyEqual(-5009377.085697311, 1e-9);
|
||||||
|
expect(bbox[3]).roughlyEqual(-10018754.171394624, 1e-9);
|
||||||
expect(queryData.get('CRS')).to.be('EPSG:3857');
|
expect(queryData.get('CRS')).to.be('EPSG:3857');
|
||||||
expect(queryData.get('FORMAT')).to.be('image/png');
|
expect(queryData.get('FORMAT')).to.be('image/png');
|
||||||
expect(queryData.get('HEIGHT')).to.be('256');
|
expect(queryData.get('HEIGHT')).to.be('256');
|
||||||
@@ -199,9 +201,11 @@ describe('ol.source.TileWMS', function() {
|
|||||||
expect(uri.getDomain()).to.be('example.com');
|
expect(uri.getDomain()).to.be('example.com');
|
||||||
expect(uri.getPath()).to.be('/wms');
|
expect(uri.getPath()).to.be('/wms');
|
||||||
var queryData = uri.getQueryData();
|
var queryData = uri.getQueryData();
|
||||||
expect(queryData.get('BBOX')).to.be(
|
var bbox = queryData.get('BBOX').split(',').map(parseFloat);
|
||||||
'-10018754.171394622,-15028131.257091936,' +
|
expect(bbox[0]).roughlyEqual(-10018754.171394622, 1e-9);
|
||||||
'-5009377.085697311,-10018754.171394624');
|
expect(bbox[1]).roughlyEqual(-15028131.257091936, 1e-9);
|
||||||
|
expect(bbox[2]).roughlyEqual(-5009377.085697311, 1e-9);
|
||||||
|
expect(bbox[3]).roughlyEqual(-10018754.171394624, 1e-9);
|
||||||
expect(queryData.get('CRS')).to.be('EPSG:3857');
|
expect(queryData.get('CRS')).to.be('EPSG:3857');
|
||||||
expect(queryData.get('FORMAT')).to.be('image/png');
|
expect(queryData.get('FORMAT')).to.be('image/png');
|
||||||
expect(queryData.get('HEIGHT')).to.be('256');
|
expect(queryData.get('HEIGHT')).to.be('256');
|
||||||
@@ -231,9 +235,11 @@ describe('ol.source.TileWMS', function() {
|
|||||||
expect(uri.getDomain()).to.be('example.com');
|
expect(uri.getDomain()).to.be('example.com');
|
||||||
expect(uri.getPath()).to.be('/wms');
|
expect(uri.getPath()).to.be('/wms');
|
||||||
var queryData = uri.getQueryData();
|
var queryData = uri.getQueryData();
|
||||||
expect(queryData.get('BBOX')).to.be(
|
var bbox = queryData.get('BBOX').split(',').map(parseFloat);
|
||||||
'-10018754.171394622,-15028131.257091936,' +
|
expect(bbox[0]).roughlyEqual(-10018754.171394622, 1e-9);
|
||||||
'-5009377.085697311,-10018754.171394624');
|
expect(bbox[1]).roughlyEqual(-15028131.257091936, 1e-9);
|
||||||
|
expect(bbox[2]).roughlyEqual(-5009377.085697311, 1e-9);
|
||||||
|
expect(bbox[3]).roughlyEqual(-10018754.171394624, 1e-9);
|
||||||
expect(queryData.get('CRS')).to.be('EPSG:3857');
|
expect(queryData.get('CRS')).to.be('EPSG:3857');
|
||||||
expect(queryData.get('FORMAT')).to.be('image/png');
|
expect(queryData.get('FORMAT')).to.be('image/png');
|
||||||
expect(queryData.get('HEIGHT')).to.be('256');
|
expect(queryData.get('HEIGHT')).to.be('256');
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ describe('ol.rendering.layer.VectorTile', function() {
|
|||||||
map = createMap('canvas');
|
map = createMap('canvas');
|
||||||
waitForTiles(source, {}, function() {
|
waitForTiles(source, {}, function() {
|
||||||
expectResemble(map, 'spec/ol/layer/expected/vectortile-canvas.png',
|
expectResemble(map, 'spec/ol/layer/expected/vectortile-canvas.png',
|
||||||
IMAGE_TOLERANCE, done);
|
11.6, done);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -175,7 +175,7 @@ describe('ol.rendering.style.Circle', function() {
|
|||||||
map = createMap('canvas');
|
map = createMap('canvas');
|
||||||
createFeatures();
|
createFeatures();
|
||||||
expectResemble(map, 'spec/ol/style/expected/circle-canvas.png',
|
expectResemble(map, 'spec/ol/style/expected/circle-canvas.png',
|
||||||
6.0, done);
|
8.0, done);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('tests the WebGL renderer', function(done) {
|
it('tests the WebGL renderer', function(done) {
|
||||||
@@ -183,7 +183,7 @@ describe('ol.rendering.style.Circle', function() {
|
|||||||
map = createMap('webgl');
|
map = createMap('webgl');
|
||||||
createFeatures();
|
createFeatures();
|
||||||
expectResemble(map, 'spec/ol/style/expected/circle-webgl.png',
|
expectResemble(map, 'spec/ol/style/expected/circle-webgl.png',
|
||||||
7.0, done);
|
8.0, done);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ describe('ol.rendering.style.Icon', function() {
|
|||||||
map = createMap('webgl');
|
map = createMap('webgl');
|
||||||
createFeatures(function() {
|
createFeatures(function() {
|
||||||
expectResemble(map, 'spec/ol/style/expected/icon-webgl.png',
|
expectResemble(map, 'spec/ol/style/expected/icon-webgl.png',
|
||||||
IMAGE_TOLERANCE, done);
|
2.0, done);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ describe('ol.rendering.style.RegularShape', function() {
|
|||||||
map = createMap('canvas');
|
map = createMap('canvas');
|
||||||
createFeatures();
|
createFeatures();
|
||||||
expectResemble(map, 'spec/ol/style/expected/regularshape-canvas.png',
|
expectResemble(map, 'spec/ol/style/expected/regularshape-canvas.png',
|
||||||
6.0, done);
|
9.4, done);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('tests the WebGL renderer', function(done) {
|
it('tests the WebGL renderer', function(done) {
|
||||||
@@ -111,7 +111,7 @@ describe('ol.rendering.style.RegularShape', function() {
|
|||||||
map = createMap('webgl');
|
map = createMap('webgl');
|
||||||
createFeatures();
|
createFeatures();
|
||||||
expectResemble(map, 'spec/ol/style/expected/regularshape-webgl.png',
|
expectResemble(map, 'spec/ol/style/expected/regularshape-webgl.png',
|
||||||
IMAGE_TOLERANCE, done);
|
8.2, done);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user