From c3beae6b16099b02ec84ace403716d017113b96f Mon Sep 17 00:00:00 2001 From: Bart van den Eijnden Date: Wed, 10 Dec 2014 11:59:02 +0100 Subject: [PATCH] Fix failing tests in IE9 --- test/spec/ol/format/osmxmlformat.test.js | 2 +- test/spec/ol/format/wfs/TransactionUpdate.xml | 8 ++++---- test/spec/ol/format/wfsformat.test.js | 10 +++++----- test/spec/ol/source/tilewmssource.test.js | 9 ++++++--- 4 files changed, 16 insertions(+), 13 deletions(-) diff --git a/test/spec/ol/format/osmxmlformat.test.js b/test/spec/ol/format/osmxmlformat.test.js index 9053083aa1..025db6e611 100644 --- a/test/spec/ol/format/osmxmlformat.test.js +++ b/test/spec/ol/format/osmxmlformat.test.js @@ -53,7 +53,7 @@ describe('ol.format.OSMXML', function() { ' ' + ' ' + ' ' + - ' ' + + ' ' + ''; var fs = format.readFeatures(text); expect(fs).to.have.length(3); diff --git a/test/spec/ol/format/wfs/TransactionUpdate.xml b/test/spec/ol/format/wfs/TransactionUpdate.xml index 317a5dfbe4..9155d91dfe 100644 --- a/test/spec/ol/format/wfs/TransactionUpdate.xml +++ b/test/spec/ol/format/wfs/TransactionUpdate.xml @@ -8,10 +8,10 @@ - -12279454.47665902 6741885.67968707 -12064207.805007964 - 6732101.740066567 -11941908.559751684 6595126.585379533 - -12240318.718177011 6507071.128795006 -12416429.631346056 - 6604910.52500003 + -12279454 6741885 -12064207 + 6732101 -11941908 6595126 + -12240318 6507071 -12416429 + 6604910 diff --git a/test/spec/ol/format/wfsformat.test.js b/test/spec/ol/format/wfsformat.test.js index 06f1686986..09a3f6efb5 100644 --- a/test/spec/ol/format/wfsformat.test.js +++ b/test/spec/ol/format/wfsformat.test.js @@ -296,11 +296,11 @@ describe('ol.format.WFS', function() { var updateFeature = new ol.Feature(); updateFeature.setGeometryName('the_geom'); updateFeature.setGeometry(new ol.geom.MultiLineString([[ - [-12279454.47665902, 6741885.67968707], - [-12064207.805007964, 6732101.740066567], - [-11941908.559751684, 6595126.585379533], - [-12240318.718177011, 6507071.128795006], - [-12416429.631346056, 6604910.52500003] + [-12279454, 6741885], + [-12064207, 6732101], + [-11941908, 6595126], + [-12240318, 6507071], + [-12416429, 6604910] ]])); updateFeature.setId('FAULTS.4455'); var serialized = format.writeTransaction(null, [updateFeature], null, { diff --git a/test/spec/ol/source/tilewmssource.test.js b/test/spec/ol/source/tilewmssource.test.js index d883f3694b..069248be8e 100644 --- a/test/spec/ol/source/tilewmssource.test.js +++ b/test/spec/ol/source/tilewmssource.test.js @@ -48,9 +48,12 @@ describe('ol.source.TileWMS', function() { expect(tile).to.be.an(ol.ImageTile); var uri = new goog.Uri(tile.src_); var queryData = uri.getQueryData(); - expect(queryData.get('BBOX')).to.be( - '-10331840.239250705,-15341217.324948015,' + - '-4696291.017841229,-9705668.103538537'); + var bbox = queryData.get('BBOX').split(','); + var expected = [-10331840.239250705, -15341217.324948015, + -4696291.017841229, -9705668.103538537]; + for (var i = 0, ii = bbox.length; i < ii; ++i) { + expect(parseFloat(bbox[i])).to.roughlyEqual(expected[i], 1e-9); + } expect(queryData.get('HEIGHT')).to.be('288'); expect(queryData.get('WIDTH')).to.be('288'); });