Nickolay - Test.Run-0.10

Documentation | Source
Class('Test.Run.Harness.Browser.Multi', {
    
    isa : Test.Run.Harness.Browser,
    
    my : {
        
        have : {
            viewport : null
        },
        
        
        after : {
            
            onTestSuiteStart : function (descriptors) {
                this.viewport.declareTests(descriptors)
            },
            
            
            onTestStart : function (test) {
                this.viewport.onTestStart(test)
            },
            
            
            onTestUpdate : function (test, result) {
                this.viewport.onTestUpdate(test, result)
            },
            
            
            onTestEnd : function (test) {
                this.viewport.onTestEnd(test)
            },
            
            
            onTestFail : function (test, exception) {
            }
        },
        
        
        methods : {
            
            start : function () {
                var me = this
                
                //waiting for viewport
                if (!this.viewport) { 
                    var startArguments = Array.prototype.slice.call(arguments)
                    
                    Ext.onReady(function(){
                        
                        me.viewport = new Test.Run.Harness.Browser.UI.Viewport({
                            title       : me.title,
                            harness     : me
                        })
                        
                        me.start.apply(me, startArguments)
                    })
                    
                } else 
                    this.SUPERARG(arguments)
            }
            
        }
        
    }
    //eof my
})
//eof Test.Run.Harness.Browser.Multi