www/build/tools/csslint-rhino.js
function () {

                //flag to indicate if the TestRunner should wait before continuing
                var shouldWait = false;

                //get the next test node
                var node = this._next();

                if (node !== null) {

                    //set flag to say the testrunner is running
                    this._running = true;

                    //eliminate last results
                    this._lastResult = null;

                    var testObject = node.testObject;

                    //figure out what to do
                    if (typeof testObject == "object" && testObject !== null){
                        if (testObject instanceof YUITest.TestSuite){
                            this.fire({ type: this.TEST_SUITE_BEGIN_EVENT, testSuite: testObject });
                            node._start = new Date();
                            this._execNonTestMethod(node, "setUp" ,false);
                        } else if (testObject instanceof YUITest.TestCase){
                            this.fire({ type: this.TEST_CASE_BEGIN_EVENT, testCase: testObject });
                            node._start = new Date();

                            //regular or async init
                            /*try {
                                if (testObject["async:init"]){
                                    testObject["async:init"](this._context);
                                    return;
                                } else {
                                    testObject.init(this._context);
                                }
                            } catch (ex){
                                node.results.errors++;
                                this.fire({ type: this.ERROR_EVENT, error: ex, testCase: testObject, methodName: "init" });
                            }*/
                            if(this._execNonTestMethod(node, "init", true)){
                                return;
                            }
                        }

                        //some environments don't support setTimeout
                        if (typeof setTimeout != "undefined"){
                            setTimeout(function(){
                                YUITest.TestRunner._run();
                            }, 0);
                        } else {
                            this._run();
                        }
                    } else {
                        this._runTest(node);
                    }

                }
            }
function () {

                //flag to indicate if the TestRunner should wait before continuing
                var shouldWait = false;

                //get the next test node
                var node = this._next();

                if (node !== null) {

                    //set flag to say the testrunner is running
                    this._running = true;

                    //eliminate last results
                    this._lastResult = null;

                    var testObject = node.testObject;

                    //figure out what to do
                    if (typeof testObject == "object" && testObject !== null){
                        if (testObject instanceof YUITest.TestSuite){
                            this.fire({ type: this.TEST_SUITE_BEGIN_EVENT, testSuite: testObject });
                            node._start = new Date();
                            this._execNonTestMethod(node, "setUp" ,false);
                        } else if (testObject instanceof YUITest.TestCase){
                            this.fire({ type: this.TEST_CASE_BEGIN_EVENT, testCase: testObject });
                            node._start = new Date();

                            //regular or async init
                            /*try {
                                if (testObject["async:init"]){
                                    testObject["async:init"](this._context);
                                    return;
                                } else {
                                    testObject.init(this._context);
                                }
                            } catch (ex){
                                node.results.errors++;
                                this.fire({ type: this.ERROR_EVENT, error: ex, testCase: testObject, methodName: "init" });
                            }*/
                            if(this._execNonTestMethod(node, "init", true)){
                                return;
                            }
                        }

                        //some environments don't support setTimeout
                        if (typeof setTimeout != "undefined"){
                            setTimeout(function(){
                                YUITest.TestRunner._run();
                            }, 0);
                        } else {
                            this._run();
                        }
                    } else {
                        this._runTest(node);
                    }

                }
            }
function ( ) { //flag to indicate if the TestRunner should wait before continuing var shouldWait = false ; //get the next test node var node = this . _next ( ) ; if ( node !== null ) { //set flag to say the testrunner is running this . _running = true ; //eliminate last results this . _lastResult = null ; var testObject = node . testObject ; //figure out what to do if ( typeof testObject == "object" && testObject !== null ) { if ( testObject instanceof YUITest . TestSuite ) { this . fire ( { type : this . TEST_SUITE_BEGIN_EVENT , testSuite : testObject } ) ; node . _start = new Date ( ) ; this . _execNonTestMethod ( node , "setUp" , false ) ; } else if ( testObject instanceof YUITest . TestCase ) { this . fire ( { type : this . TEST_CASE_BEGIN_EVENT , testCase : testObject } ) ; node . _start = new Date ( ) ; //regular or async init /*try {
                                if (testObject["async:init"]){
                                    testObject["async:init"](this._context);
                                    return;
                                } else {
                                    testObject.init(this._context);
                                }
                            } catch (ex){
                                node.results.errors++;
                                this.fire({ type: this.ERROR_EVENT, error: ex, testCase: testObject, methodName: "init" });
                            }*/ if ( this . _execNonTestMethod ( node , "init" , true ) ) { return ; } } //some environments don't support setTimeout if ( typeof setTimeout != "undefined" ) { setTimeout ( function ( ) { YUITest . TestRunner . _run ( ) ; } , 0 ) ; } else { this . _run ( ) ; } } else { this . _runTest ( node ) ; } } }
Runs a test case or test suite, returning the results.
@param {YUITest.TestCase|YUITest.TestSuite} testObject The test case or test suite to run.
@return {Object} Results of the execution with properties passed, failed, and total.
@private
@method _run
@static
Runs a test case or test suite returning the results .