Changeset 16684

Show
Ignore:
Timestamp:
02/15/09 01:38:56 (12 months ago)
Author:
liucougar
Message:

fixes #8378: probably set the global progress bar for nested doh test cases (such as dojo._base test)
also fixed a problem where failure groups are not marked properly
!strict

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • util/trunk/doh/_browserRunner.js

    r15376 r16684  
    246246                                this._suiteCount = this._testCount; 
    247247                        } 
    248                         this._runedSuite++; 
    249248                        // console.debug("_groupStarted", group); 
    250249                        if(doh._inGroup != group){ 
     
    252251                                doh._runed = 0; 
    253252                                doh._inGroup = group; 
     253                                this._runedSuite++; 
    254254                        } 
    255255                        var gn = getGroupNode(group); 
     
    263263                        var gn = getGroupNode(group); 
    264264                        if(gn && doh._inGroup == group){ 
    265                                 gn.className = (success) ? "success" : "failure"; 
    266265                                gn.getElementsByTagName("td")[3].innerHTML = doh._totalTime+"ms"; 
    267266                                gn.getElementsByTagName("td")[2].lastChild.className = ""; 
    268267                                doh._inGroup = null; 
    269268                                //doh._runedSuite++; 
    270                                 doh._updateGlobalProgressBar(this._runedSuite/this._suiteCount,success); 
     269                                var failure = doh._updateGlobalProgressBar(this._runedSuite/this._groupCount,success,group); 
     270                                gn.className = failure ? "failure" : "success"; 
    271271                                //doh._runedSuite--; 
    272                                 doh._currentGlobalProgressBarWidth = parseInt(this._runedSuite/this._suiteCount*10000)/100; 
     272                                doh._currentGlobalProgressBarWidth = parseInt(this._runedSuite/this._groupCount*10000)/100; 
    273273                                //byId("progressOuter").style.width = parseInt(this._runedSuite/this._suiteCount*100)+"%"; 
    274274                        } 
     
    301301                } 
    302302 
    303                 doh._updateGlobalProgressBar = function(p,success){ 
     303                doh._updateGlobalProgressBar = function(p,success,group){ 
    304304                        var outerContainer=byId("progressOuter"); 
    305305                                         
     
    310310                                gdiv.className='success'; 
    311311                        } 
    312                         if(!success){ 
     312                        if(!success && !gdiv._failure){ 
    313313                                gdiv._failure=true; 
    314314                                gdiv.className='failure'; 
     315                                if(group){ 
     316                                        gdiv.setAttribute('title','failed group '+group); 
     317                                } 
    315318                        } 
    316319                        var tp=parseInt(p*10000)/100; 
     
    339342                                if(gn && doh._curTestCount){ 
    340343                                        var p = doh._runed/doh._curTestCount; 
    341                                         var groupfail = this._updateGlobalProgressBar((doh._runedSuite+p-1)/doh._suiteCount,success); 
     344                                        var groupfail = this._updateGlobalProgressBar((doh._runedSuite+p-1)/doh._groupCount,success,group); 
    342345                                         
    343346                                        var pbar = gn.getElementsByTagName("td")[2].lastChild; 
     
    516519                                _doh._testCount += doh._testCount; 
    517520                                // should we be really adding raw group counts? 
    518                                 _doh._groupCount += doh._groupCount; 
     521                                //_doh._groupCount += doh._groupCount; 
    519522                                _doh.currentTestDeferred.callback(true); 
    520523                        }