Remove XML prolog from tests. Browsers can't seem to decide whether they like
it or not, and #1218 will cause the behavior to change across the board, most likely, so we'll just be slightly more accepting, since the XML prolog is almost definitely unlikely to not matter. git-svn-id: http://svn.openlayers.org/trunk/openlayers@5478 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
var l = new OpenLayers.Geometry.LineString([point, point2]);
|
||||
var f = new OpenLayers.Feature.Vector(l);
|
||||
var data = parser.write([f]);
|
||||
var data = data.replace(/<\?[^>]*\?>/, ''); // Remove XML Prolog
|
||||
t.eq(data, '<rss xmlns="http://backend.userland.com/rss2"><item><title></title><description></description><georss:line xmlns:georss="http://www.georss.org/georss">45.68 -111.04 45.68 -112.04</georss:line></item></rss>', 'GeoRSS serializes a line correctly');
|
||||
}
|
||||
function test_Format_GeoRSS_w3cgeo(t) {
|
||||
@@ -45,6 +46,7 @@
|
||||
if (OpenLayers.Util.getBrowserName() == "opera") {
|
||||
expected_result = expected_result.replace(/>/g, ">");
|
||||
}
|
||||
var out = out.replace(/<\?[^>]*\?>/, ''); // Remove XML Prolog
|
||||
t.eq(out, expected_result, "Output gave expected value");
|
||||
}
|
||||
}
|
||||
@@ -59,6 +61,7 @@
|
||||
if (OpenLayers.Util.getBrowserName() == "opera") {
|
||||
expected_result = expected_result.replace(/>/g, ">");
|
||||
}
|
||||
var out = out.replace(/<\?[^>]*\?>/, ''); // Remove XML Prolog
|
||||
t.eq(out, expected_result, "Output gave expected value");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user