[OpenLayers-Commits] r11968 - trunk/openlayers/tests/Layer

commits-20090109 at openlayers.org commits-20090109 at openlayers.org
Fri May 13 18:03:58 EDT 2011


Author: erilem
Date: 2011-05-13 15:03:55 -0700 (Fri, 13 May 2011)
New Revision: 11968

Modified:
   trunk/openlayers/tests/Layer/Vector.html
Log:
fix Layer/Vector.html tests in FF4 (closes #3298)

Modified: trunk/openlayers/tests/Layer/Vector.html
===================================================================
--- trunk/openlayers/tests/Layer/Vector.html	2011-05-13 21:49:34 UTC (rev 11967)
+++ trunk/openlayers/tests/Layer/Vector.html	2011-05-13 22:03:55 UTC (rev 11968)
@@ -685,9 +685,12 @@
                              "given graphicHeight and graphicWidth, both are set: width");
                 feature.style = customStyle5;
                 layer.drawFeature(feature);
-                t.eq(root.firstChild.getAttributeNS(null, 'style'),
-                             'opacity: '+customStyle5.graphicOpacity.toString()+((OpenLayers.BROWSER_NAME == "opera" || OpenLayers.BROWSER_NAME == "safari") ? "" : ';'),
-                             "graphicOpacity correctly set");
+                // we use startsWith here as some browsers (at least Safari 3 and FireFox 4)
+                // do not append a semi-colon to the opacity string
+                t.ok(OpenLayers.String.startsWith(
+                            root.firstChild.getAttributeNS(null, 'style'),
+                            "opacity: " + customStyle5.graphicOpacity.toString()),
+                     "graphicOpacity correctly set");
                 feature.style = customStyle6;
                 layer.drawFeature(feature);
                 var x = geometryX / renderer.getResolution() + renderer.left;



More information about the Commits mailing list