[OpenLayers-Commits] r2121 - trunk/openlayers/tests

commits at openlayers.org commits at openlayers.org
Tue Jan 2 18:27:10 EST 2007


Author: euzuro
Date: 2007-01-02 18:27:10 -0500 (Tue, 02 Jan 2007)
New Revision: 2121

Modified:
   trunk/openlayers/tests/test_Util.html
Log:
fixing some failing opera tests

Modified: trunk/openlayers/tests/test_Util.html
===================================================================
--- trunk/openlayers/tests/test_Util.html	2007-01-02 23:00:44 UTC (rev 2120)
+++ trunk/openlayers/tests/test_Util.html	2007-01-02 23:27:10 UTC (rev 2121)
@@ -67,12 +67,15 @@
         t.eq( div.style.width, sz.w + "px", "div.style.width set correctly");    
         t.eq( div.style.height, sz.h + "px", "div.style.height set correctly");    
 
-        t.eq( div.style.backgroundImage, "url(" + img + ")", "div.style.backgroundImage correctly");    
+        bImg = div.style.backgroundImage;
+        imgCorrect = ( (bImg == "url(" + img + ")") ||  
+                       (bImg == "url(\"" + img + "\")") );
+        t.ok(imgCorrect, "div.style.backgroundImage correctly");    
 
         t.eq( div.style.position, position, "div.style.positionset correctly");    
         t.ok( (div.style.border.indexOf(border) != -1), "div.style.border set correctly");    
         t.eq( div.style.overflow, overflow, "div.style.overflow set correctly");    
-        t.eq( div.style.opacity + "", opacity + "", "elemnt.style.opacity set correctly");    
+        t.eq( parseFloat(div.style.opacity), opacity, "element.style.opacity set correctly");    
         var filterString = 'alpha(opacity=' + (opacity * 100) + ')';
         t.eq( div.style.filter, filterString, "element.style.filter set correctly");
 
@@ -95,7 +98,7 @@
         t.eq( div.style.position, "absolute", "div.style.positionset correctly");    
         t.eq( div.style.border, "", "div.style.border set correctly");    
         t.eq(div.style.overflow, "", "div.style.overflow set correctly");    
-        t.ok( !div.style.opacity, "elemnt.style.opacity set correctly");    
+        t.ok( !div.style.opacity, "element.style.opacity set correctly");    
         t.ok( !div.style.filter, "element.style.filter set correctly");
 
     }
@@ -127,7 +130,7 @@
         t.ok( (image.style.border.indexOf(border) != -1), "image.style.border set correctly");    
         t.eq( image.src, img, "image.style.backgroundImage correctly");    
         t.eq( image.style.position, position, "image.style.position set correctly");    
-        t.eq( image.style.opacity+"", opacity + "", "image.style.opacity set correctly");    
+        t.eq( parseFloat(image.style.opacity), opacity, "image.style.opacity set correctly");    
         var filterString = 'alpha(opacity=' + (opacity * 100) + ')';
         t.eq( image.style.filter, filterString, "element.style.filter set correctly");
 
@@ -148,7 +151,7 @@
         t.ok((image.style.border == ""), "image.style.border set correctly");    
         t.eq(image.src, "", "image.style.backgroundImage correctly");    
         t.eq( image.style.position, "relative", "image.style.positionset correctly");    
-        t.ok( !image.style.opacity, "elemnt.style.opacity default unset");    
+        t.ok( !image.style.opacity, "element.style.opacity default unset");    
         t.ok( !image.style.filter, "element.style.filter default unset");
 
     }
@@ -211,7 +214,7 @@
         t.eq( imageDiv.style.height, sz.h + "px", "image.style.height set correctly");    
 
         t.eq( imageDiv.style.position, position, "image.style.positionset correctly");    
-        t.eq( imageDiv.style.opacity+"", opacity + "", "elemnt.style.opacity set correctly");    
+        t.eq( parseFloat(imageDiv.style.opacity), opacity, "element.style.opacity set correctly");    
         
         var filterString;
         if (OpenLayers.Util.alphaHack()) {
@@ -293,7 +296,7 @@
         t.eq( element.style.position, position, "element.style.position set correctly");    
         t.ok( (element.style.border.indexOf(border) != -1), "element.style.border set correctly");    
         t.eq( element.style.overflow, overflow, "element.style.overflow set correctly");    
-        t.eq( element.style.opacity+"", opacity + "", "elemnt.style.opacity set correctly");    
+        t.eq( parseFloat(element.style.opacity), opacity, "element.style.opacity set correctly");    
         var filterString = 'alpha(opacity=' + (opacity * 100) + ')';
         t.eq( element.style.filter, filterString, "element.style.filter set correctly");
     }
@@ -327,7 +330,7 @@
         t.eq( imageDiv.style.height, sz.h + "px", "image.style.height set correctly");    
 
         t.eq( imageDiv.style.position, position, "image.style.position set correctly");    
-        t.eq( imageDiv.style.opacity+"", opacity + "", "elemnt.style.opacity set correctly");    
+        t.eq( parseFloat(imageDiv.style.opacity), opacity, "element.style.opacity set correctly");    
 
         
 



More information about the Commits mailing list