Changeset 8265

Show
Ignore:
Timestamp:
04/24/07 05:04:21 (21 months ago)
Author:
sjmiles
Message:

Repair test by using dojo.marginBox to measure height. Refs #2710.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • dojo/trunk/tests/_base/fx.html

    r8263 r8265  
    6363                                                        runTest: function(t){ 
    6464                                                                var duration = 500; 
    65                                                                 var startHeight = dojo.style('foo', 'height'); 
    66                                                                 console.debug("Start height is "+startHeight); 
     65                                                                var foo = dojo.byId("foo"); 
     66                                                                var startHeight = dojo.marginBox(foo).h;  
     67                                                                //console.debug("Start height is "+startHeight); 
     68                                                                 
    6769                                                                var anim = dojo.animateProperty({ 
    68                                                                         node: 'foo', 
     70                                                                        node: foo, 
    6971                                                                        properties: { height: { end: startHeight / 2 } }, 
    7072                                                                        duration: duration 
     
    7476 
    7577                                                                dojo.connect(anim, "onEnd", anim, function(){ 
    76                                                                         var height = dojo.style('foo', 'height'); 
    77                                                                         console.debug("End height is "+height); 
     78                                                                        var height = dojo.marginBox(foo).h;  
     79                                                                        //console.debug("End height is "+height); 
    7880 
    7981                                                                        var elapsed = (new Date().valueOf()) - anim._startTime; 
    8082                                                                        t.assertTrue(elapsed >= duration); 
    8183 
    82                                                                         console.debug("dojo.style('foo', 'height'): "+height+"\nHeight Style Property: "+dojo.byId('foo').style['height']+"\nIntended Height: "+(startHeight/2)); 
     84                                                                        //console.debug("dojo.contentBox(foo).h): "+height+"\nIntended Height: "+(startHeight/2)); 
    8385 
    8486                                                                        t.is(height, startHeight / 2);