Changeset 5475
- Timestamp:
- 12/17/07 21:23:41 (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
r5161 r5475 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 } 61 65 t.eq(kmlOut, kmlExpected, "correctly writes an KML doc string"); 62 66 } … … 84 88 output = format.write(feature); 85 89 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 } 86 94 t.eq(output, expected, "multipoint correctly written"); 87 95 … … 96 104 output = format.write(feature); 97 105 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 } 98 110 t.eq(output, expected, "multilinestring correctly written"); 99 111 … … 111 123 output = format.write(feature); 112 124 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 } 113 129 t.eq(output, expected, "multilinestring correctly written"); 114 130
