OpenLayers OpenLayers

Changeset 5472

Show
Ignore:
Timestamp:
12/17/07 10:44:00 (1 year ago)
Author:
pagameba
Message:

patches Test.AnotherWay._constructor_name to return an appropriate value using 'typeof' instead of an empty string when the constructor of a value could not be correctly determined using the current logic. This fixes many of the tests in Safari 3 and does not appear to affect FF2 or IE6 since the current logic is working for them.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/openlayers/tests/auto-tests.html

    r5449 r5472  
    380380        return RegExp.$1; 
    381381    }else { 
    382         return ""; 
    383     } 
     382      var c = ''; 
     383      switch(typeof x) { 
     384        case 'string': 
     385          c = 'String'; 
     386          break; 
     387        case 'object': 
     388          c = 'Object'; 
     389          break; 
     390        default: 
     391          c = ''; 
     392      } 
     393        return c;   } 
    384394} 
    385395Test.AnotherWay._is_array=function( x ) 
  • trunk/openlayers/tests/run-tests.html

    r5447 r5472  
    346346        return RegExp.$1; 
    347347    }else { 
    348         return ""; 
     348      var c = ''; 
     349      switch(typeof x) { 
     350        case 'string': 
     351          c = 'String'; 
     352          break; 
     353        case 'object': 
     354          c = 'Object'; 
     355          break; 
     356        default: 
     357          c = ''; 
     358      } 
     359        return c; 
    349360    } 
    350361}