Changeset 5477
- Timestamp:
- 12/17/07 21:33:01 (1 year ago)
- Files:
-
- trunk/openlayers/tests/Format/test_KML.html (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/openlayers/tests/Format/test_KML.html
r5475 r5477 59 59 var features = format.read(kmlExpected); 60 60 var kmlOut = format.write(features); 61 if (OpenLayers.Util.getBrowserName() == "safari") {62 t.debug_print("Safari's XMLSerializer doesn't support XML namespaces.");63 kmlExpected = kmlExpected.replace(/ xmlns[:a-z]*="[^"]*"/g, '');64 }65 61 t.eq(kmlOut, kmlExpected, "correctly writes an KML doc string"); 66 62 } … … 88 84 output = format.write(feature); 89 85 expected = '<kml xmlns="http://earth.google.com/kml/2.0"><Folder><name>OpenLayers export</name><description>test output</description><Placemark><name>test name</name><description>No description available</description><MultiGeometry><Point><coordinates>0,1</coordinates></Point></MultiGeometry></Placemark></Folder></kml>'; 90 if (OpenLayers.Util.getBrowserName() == "safari") {91 t.debug_print("Safari's XMLSerializer doesn't support XML namespaces.");92 expected = expected.replace(/ xmlns[:a-z]*="[^"]*"/g, '');93 }94 86 t.eq(output, expected, "multipoint correctly written"); 95 87 … … 104 96 output = format.write(feature); 105 97 expected = '<kml xmlns="http://earth.google.com/kml/2.0"><Folder><name>OpenLayers export</name><description>test output</description><Placemark><name>test name</name><description>No description available</description><MultiGeometry><LineString><coordinates>1,0 0,1</coordinates></LineString></MultiGeometry></Placemark></Folder></kml>'; 106 if (OpenLayers.Util.getBrowserName() == "safari") {107 t.debug_print("Safari's XMLSerializer doesn't support XML namespaces.");108 expected = expected.replace(/ xmlns[:a-z]*="[^"]*"/g, '');109 }110 98 t.eq(output, expected, "multilinestring correctly written"); 111 99 … … 123 111 output = format.write(feature); 124 112 expected = '<kml xmlns="http://earth.google.com/kml/2.0"><Folder><name>OpenLayers export</name><description>test output</description><Placemark><name>test name</name><description>No description available</description><MultiGeometry><Polygon><outerBoundaryIs><LinearRing><coordinates>0,0 1,0 0,1 0,0</coordinates></LinearRing></outerBoundaryIs></Polygon></MultiGeometry></Placemark></Folder></kml>'; 125 if (OpenLayers.Util.getBrowserName() == "safari") {126 t.debug_print("Safari's XMLSerializer doesn't support XML namespaces.");127 expected = expected.replace(/ xmlns[:a-z]*="[^"]*"/g, '');128 }129 113 t.eq(output, expected, "multilinestring correctly written"); 130 114
