fix Layer/Vector.html tests in FF4 (closes #3298)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@11968 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Éric Lemoine
2011-05-13 22:03:55 +00:00
parent fedcad3cb4
commit c82704905d
+5 -2
View File
@@ -685,8 +685,11 @@
"given graphicHeight and graphicWidth, both are set: width"); "given graphicHeight and graphicWidth, both are set: width");
feature.style = customStyle5; feature.style = customStyle5;
layer.drawFeature(feature); layer.drawFeature(feature);
t.eq(root.firstChild.getAttributeNS(null, 'style'), // we use startsWith here as some browsers (at least Safari 3 and FireFox 4)
'opacity: '+customStyle5.graphicOpacity.toString()+((OpenLayers.BROWSER_NAME == "opera" || OpenLayers.BROWSER_NAME == "safari") ? "" : ';'), // 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"); "graphicOpacity correctly set");
feature.style = customStyle6; feature.style = customStyle6;
layer.drawFeature(feature); layer.drawFeature(feature);