Changeset 7915

Show
Ignore:
Timestamp:
04/03/07 00:57:24 (22 months ago)
Author:
alex
Message:

command line tests were b0rken. This fixes. Refs #2500

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • dojo/trunk/tests/runner.js

    r7900 r7915  
    763763} 
    764764 
     765 
    765766try{ 
    766767        dojo.platformRequire({ 
     
    771772        var _shouldRequire = (dojo.isBrowser) ? (window == window.parent) : true; 
    772773        if(_shouldRequire){ 
    773                 dojo.addOnLoad(function(){ 
    774                         if(dojo.byId("testList")){ 
    775                                 dojo.require("tests._base"); 
    776                                 setTimeout(function(){ 
    777                                         tests.run(); 
    778                                 }, 100); 
    779                         } 
    780                 }); 
    781         } 
    782         // set us up for a run 
     774                if(dojo.isBrowser){ 
     775                        dojo.addOnLoad(function(){ 
     776                                if(dojo.byId("testList")){ 
     777                                        dojo.require("tests._base"); 
     778                                        setTimeout(function(){ 
     779                                                tests.run(); 
     780                                        }, 100); 
     781                                } 
     782                        }); 
     783                }else{ 
     784                        dojo.require("tests._base"); 
     785                } 
     786        } 
    783787}catch(e){ 
    784         if(this["load"]){ 
    785                 load("_rhinoRunner.js"); 
    786                 load("_base.js"); 
    787  
    788                 print("\n"+tests._line); 
    789                 print("The Dojo Unit Test Harness, $Rev$"); 
    790                 print("Copyright (c) 2007, The Dojo Foundation, All Rights Reserved"); 
    791                 print(tests._line, "\n"); 
    792  
    793                 tests.run(); 
    794         } 
    795 } 
     788        load("_rhinoRunner.js"); 
     789        load("_base.js"); 
     790 
     791        print("\n"+tests._line); 
     792        print("The Dojo Unit Test Harness, $Rev$"); 
     793        print("Copyright (c) 2007, The Dojo Foundation, All Rights Reserved"); 
     794        print(tests._line, "\n"); 
     795 
     796        tests.run(); 
     797}