/*
YUI 3.17.2 (build 9c3c78e)
Copyright 2014 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/

if (typeof __coverage__ === 'undefined') { __coverage__ = {}; }
if (!__coverage__['build/test-console/test-console.js']) {
   __coverage__['build/test-console/test-console.js'] = {"path":"build/test-console/test-console.js","s":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0},"b":{"1":[0,0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[0,0],"8":[0,0],"9":[0,0],"10":[0,0],"11":[0,0],"12":[0,0],"13":[0,0],"14":[0,0],"15":[0,0],"16":[0,0],"17":[0,0]},"f":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":24},"end":{"line":1,"column":43}}},"2":{"name":"TestConsole","line":33,"loc":{"start":{"line":33,"column":0},"end":{"line":33,"column":23}}},"3":{"name":"(anonymous_3)","line":38,"loc":{"start":{"line":38,"column":17},"end":{"line":38,"column":35}}},"4":{"name":"(anonymous_4)","line":66,"loc":{"start":{"line":66,"column":17},"end":{"line":66,"column":32}}},"5":{"name":"(anonymous_5)","line":84,"loc":{"start":{"line":84,"column":26},"end":{"line":84,"column":46}}},"6":{"name":"(anonymous_6)","line":100,"loc":{"start":{"line":100,"column":32},"end":{"line":100,"column":47}}},"7":{"name":"(anonymous_7)","line":123,"loc":{"start":{"line":123,"column":19},"end":{"line":123,"column":31}}},"8":{"name":"(anonymous_8)","line":153,"loc":{"start":{"line":153,"column":28},"end":{"line":153,"column":52}}},"9":{"name":"(anonymous_9)","line":160,"loc":{"start":{"line":160,"column":38},"end":{"line":160,"column":59}}},"10":{"name":"(anonymous_10)","line":177,"loc":{"start":{"line":177,"column":14},"end":{"line":177,"column":40}}},"11":{"name":"(anonymous_11)","line":192,"loc":{"start":{"line":192,"column":26},"end":{"line":192,"column":60}}},"12":{"name":"(anonymous_12)","line":196,"loc":{"start":{"line":196,"column":29},"end":{"line":196,"column":43}}},"13":{"name":"(anonymous_13)","line":211,"loc":{"start":{"line":211,"column":26},"end":{"line":211,"column":50}}},"14":{"name":"(anonymous_14)","line":215,"loc":{"start":{"line":215,"column":29},"end":{"line":215,"column":49}}},"15":{"name":"(anonymous_15)","line":216,"loc":{"start":{"line":216,"column":51},"end":{"line":216,"column":66}}},"16":{"name":"(anonymous_16)","line":228,"loc":{"start":{"line":228,"column":19},"end":{"line":228,"column":39}}},"17":{"name":"(anonymous_17)","line":232,"loc":{"start":{"line":232,"column":32},"end":{"line":232,"column":61}}},"18":{"name":"(anonymous_18)","line":241,"loc":{"start":{"line":241,"column":72},"end":{"line":241,"column":86}}},"19":{"name":"(anonymous_19)","line":254,"loc":{"start":{"line":254,"column":20},"end":{"line":254,"column":31}}},"20":{"name":"(anonymous_20)","line":267,"loc":{"start":{"line":267,"column":14},"end":{"line":267,"column":27}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":307,"column":91}},"2":{"start":{"line":33,"column":0},"end":{"line":35,"column":1}},"3":{"start":{"line":34,"column":4},"end":{"line":34,"column":62}},"4":{"start":{"line":37,"column":0},"end":{"line":304,"column":3}},"5":{"start":{"line":39,"column":8},"end":{"line":39,"column":40}},"6":{"start":{"line":41,"column":8},"end":{"line":54,"column":11}},"7":{"start":{"line":56,"column":8},"end":{"line":56,"column":72}},"8":{"start":{"line":67,"column":8},"end":{"line":68,"column":24}},"9":{"start":{"line":70,"column":8},"end":{"line":72,"column":9}},"10":{"start":{"line":71,"column":12},"end":{"line":71,"column":23}},"11":{"start":{"line":74,"column":8},"end":{"line":76,"column":9}},"12":{"start":{"line":75,"column":12},"end":{"line":75,"column":23}},"13":{"start":{"line":77,"column":8},"end":{"line":77,"column":19}},"14":{"start":{"line":85,"column":8},"end":{"line":98,"column":23}},"15":{"start":{"line":100,"column":8},"end":{"line":110,"column":11}},"16":{"start":{"line":101,"column":12},"end":{"line":101,"column":49}},"17":{"start":{"line":102,"column":12},"end":{"line":102,"column":46}},"18":{"start":{"line":103,"column":12},"end":{"line":103,"column":69}},"19":{"start":{"line":104,"column":12},"end":{"line":104,"column":84}},"20":{"start":{"line":106,"column":12},"end":{"line":106,"column":57}},"21":{"start":{"line":107,"column":12},"end":{"line":107,"column":54}},"22":{"start":{"line":108,"column":12},"end":{"line":108,"column":81}},"23":{"start":{"line":109,"column":12},"end":{"line":109,"column":96}},"24":{"start":{"line":113,"column":8},"end":{"line":113,"column":154}},"25":{"start":{"line":114,"column":8},"end":{"line":114,"column":173}},"26":{"start":{"line":116,"column":8},"end":{"line":116,"column":67}},"27":{"start":{"line":124,"column":8},"end":{"line":145,"column":10}},"28":{"start":{"line":154,"column":8},"end":{"line":156,"column":20}},"29":{"start":{"line":158,"column":8},"end":{"line":168,"column":9}},"30":{"start":{"line":159,"column":12},"end":{"line":159,"column":42}},"31":{"start":{"line":160,"column":12},"end":{"line":167,"column":15}},"32":{"start":{"line":161,"column":16},"end":{"line":163,"column":44}},"33":{"start":{"line":164,"column":16},"end":{"line":166,"column":17}},"34":{"start":{"line":165,"column":20},"end":{"line":165,"column":42}},"35":{"start":{"line":178,"column":8},"end":{"line":178,"column":30}},"36":{"start":{"line":179,"column":8},"end":{"line":182,"column":9}},"37":{"start":{"line":180,"column":12},"end":{"line":180,"column":51}},"38":{"start":{"line":181,"column":12},"end":{"line":181,"column":45}},"39":{"start":{"line":183,"column":8},"end":{"line":183,"column":19}},"40":{"start":{"line":193,"column":8},"end":{"line":194,"column":43}},"41":{"start":{"line":196,"column":8},"end":{"line":201,"column":11}},"42":{"start":{"line":197,"column":12},"end":{"line":197,"column":27}},"43":{"start":{"line":198,"column":12},"end":{"line":200,"column":13}},"44":{"start":{"line":199,"column":16},"end":{"line":199,"column":33}},"45":{"start":{"line":202,"column":8},"end":{"line":202,"column":56}},"46":{"start":{"line":203,"column":8},"end":{"line":203,"column":19}},"47":{"start":{"line":212,"column":8},"end":{"line":213,"column":43}},"48":{"start":{"line":215,"column":8},"end":{"line":219,"column":11}},"49":{"start":{"line":216,"column":12},"end":{"line":216,"column":87}},"50":{"start":{"line":216,"column":68},"end":{"line":216,"column":83}},"51":{"start":{"line":217,"column":12},"end":{"line":217,"column":41}},"52":{"start":{"line":218,"column":12},"end":{"line":218,"column":42}},"53":{"start":{"line":220,"column":8},"end":{"line":220,"column":56}},"54":{"start":{"line":221,"column":8},"end":{"line":221,"column":19}},"55":{"start":{"line":229,"column":8},"end":{"line":230,"column":39}},"56":{"start":{"line":232,"column":8},"end":{"line":245,"column":11}},"57":{"start":{"line":233,"column":12},"end":{"line":233,"column":43}},"58":{"start":{"line":235,"column":12},"end":{"line":235,"column":54}},"59":{"start":{"line":236,"column":12},"end":{"line":236,"column":69}},"60":{"start":{"line":237,"column":12},"end":{"line":237,"column":73}},"61":{"start":{"line":238,"column":12},"end":{"line":238,"column":74}},"62":{"start":{"line":239,"column":12},"end":{"line":239,"column":67}},"63":{"start":{"line":240,"column":12},"end":{"line":240,"column":32}},"64":{"start":{"line":241,"column":12},"end":{"line":243,"column":15}},"65":{"start":{"line":242,"column":16},"end":{"line":242,"column":115}},"66":{"start":{"line":246,"column":8},"end":{"line":246,"column":44}},"67":{"start":{"line":255,"column":8},"end":{"line":255,"column":51}},"68":{"start":{"line":256,"column":8},"end":{"line":258,"column":9}},"69":{"start":{"line":257,"column":12},"end":{"line":257,"column":19}},"70":{"start":{"line":259,"column":8},"end":{"line":263,"column":9}},"71":{"start":{"line":260,"column":12},"end":{"line":260,"column":41}},"72":{"start":{"line":262,"column":12},"end":{"line":262,"column":48}},"73":{"start":{"line":268,"column":8},"end":{"line":268,"column":28}},"74":{"start":{"line":270,"column":8},"end":{"line":275,"column":9}},"75":{"start":{"line":272,"column":12},"end":{"line":272,"column":36}},"76":{"start":{"line":273,"column":15},"end":{"line":275,"column":9}},"77":{"start":{"line":274,"column":12},"end":{"line":274,"column":31}}},"branchMap":{"1":{"line":47,"type":"binary-expr","locations":[{"start":{"line":47,"column":16},"end":{"line":47,"column":22}},{"start":{"line":47,"column":26},"end":{"line":47,"column":40}},{"start":{"line":47,"column":45},"end":{"line":47,"column":47}}]},"2":{"line":70,"type":"if","locations":[{"start":{"line":70,"column":8},"end":{"line":70,"column":8}},{"start":{"line":70,"column":8},"end":{"line":70,"column":8}}]},"3":{"line":70,"type":"binary-expr","locations":[{"start":{"line":70,"column":12},"end":{"line":70,"column":39}},{"start":{"line":70,"column":43},"end":{"line":70,"column":74}}]},"4":{"line":74,"type":"if","locations":[{"start":{"line":74,"column":8},"end":{"line":74,"column":8}},{"start":{"line":74,"column":8},"end":{"line":74,"column":8}}]},"5":{"line":74,"type":"binary-expr","locations":[{"start":{"line":74,"column":12},"end":{"line":74,"column":32}},{"start":{"line":74,"column":36},"end":{"line":74,"column":60}}]},"6":{"line":158,"type":"if","locations":[{"start":{"line":158,"column":8},"end":{"line":158,"column":8}},{"start":{"line":158,"column":8},"end":{"line":158,"column":8}}]},"7":{"line":164,"type":"if","locations":[{"start":{"line":164,"column":16},"end":{"line":164,"column":16}},{"start":{"line":164,"column":16},"end":{"line":164,"column":16}}]},"8":{"line":164,"type":"binary-expr","locations":[{"start":{"line":164,"column":20},"end":{"line":164,"column":50}},{"start":{"line":164,"column":54},"end":{"line":164,"column":69}}]},"9":{"line":179,"type":"if","locations":[{"start":{"line":179,"column":8},"end":{"line":179,"column":8}},{"start":{"line":179,"column":8},"end":{"line":179,"column":8}}]},"10":{"line":198,"type":"if","locations":[{"start":{"line":198,"column":12},"end":{"line":198,"column":12}},{"start":{"line":198,"column":12},"end":{"line":198,"column":12}}]},"11":{"line":256,"type":"if","locations":[{"start":{"line":256,"column":8},"end":{"line":256,"column":8}},{"start":{"line":256,"column":8},"end":{"line":256,"column":8}}]},"12":{"line":259,"type":"if","locations":[{"start":{"line":259,"column":8},"end":{"line":259,"column":8}},{"start":{"line":259,"column":8},"end":{"line":259,"column":8}}]},"13":{"line":270,"type":"if","locations":[{"start":{"line":270,"column":8},"end":{"line":270,"column":8}},{"start":{"line":270,"column":8},"end":{"line":270,"column":8}}]},"14":{"line":270,"type":"binary-expr","locations":[{"start":{"line":270,"column":12},"end":{"line":270,"column":35}},{"start":{"line":271,"column":19},"end":{"line":271,"column":75}}]},"15":{"line":273,"type":"if","locations":[{"start":{"line":273,"column":15},"end":{"line":273,"column":15}},{"start":{"line":273,"column":15},"end":{"line":273,"column":15}}]},"16":{"line":301,"type":"cond-expr","locations":[{"start":{"line":301,"column":44},"end":{"line":301,"column":50}},{"start":{"line":301,"column":53},"end":{"line":301,"column":62}}]},"17":{"line":301,"type":"binary-expr","locations":[{"start":{"line":301,"column":19},"end":{"line":301,"column":26}},{"start":{"line":301,"column":30},"end":{"line":301,"column":41}}]}},"code":["(function () { YUI.add('test-console', function (Y, NAME) {","","/**","Provides a specialized log console widget that's pre-configured to display YUI","Test output with no extra configuration.","","@example","","    <div id=\"log\" class=\"yui3-skin-sam\"></div>","","    <script>","    YUI().use('test-console', function (Y) {","        // ... set up your test cases here ...","","        // Render the console inside the #log div, then run the tests.","        new Y.Test.Console().render('#log');","        Y.Test.Runner.run();","    });","    </script>","","@module test-console","@namespace Test","@class Console","@extends Console","@constructor","","@param {Object} [config] Config attributes.","    @param {Object} [config.filters] Category filter configuration.","","@since 3.5.0","**/","","function TestConsole() {","    TestConsole.superclass.constructor.apply(this, arguments);","}","","Y.namespace('Test').Console = Y.extend(TestConsole, Y.Console, {","    initializer: function (config) {","        this.on('entry', this._onEntry);","","        this.plug(Y.Plugin.ConsoleFilters, {","            category: Y.merge({","                info  : true,","                pass  : false,","                fail  : true,","                status: false","            }, (config && config.filters) || {}),","","            defaultVisibility: false,","","            source: {","                TestRunner: true","            }","        });","","        Y.Test.Runner.on('complete', Y.bind(this._parseCoverage, this));","    },","","    // -- Protected Coverage Parser ---------------------------------------------","    /**","    * Scans the coverage data to determine if it's an Istanbul coverage object.","    * @method _isIstanbul","    * @param {Object} json The coverage data to scan","    * @return {Boolean} True if this is Istanbul Coverage","    */","    _isIstanbul: function(json) {","        var first = Y.Object.keys(json)[0],","            ret = false;","","        if (json[first].s !== undefined && json[first].fnMap !== undefined) {","            ret = true;","        }","","        if (json.s !== undefined && json.fnMap !== undefined) {","            ret = true;","        }","        return ret;","    },","    /**","    * Parses and logs a summary of YUITest coverage data.","    * @method parseYUITest","    * @param {Object} coverage The YUITest Coverage JSON data","    */","    parseYUITestCoverage: function (coverage) {","        var cov = {","            lines: {","                hit: 0,","                miss: 0,","                total: 0,","                percent: 0","            },","            functions: {","                hit: 0,","                miss: 0,","                total: 0,","                percent: 0","            }","        }, coverageLog;","","        Y.Object.each(coverage, function(info) {","            cov.lines.total += info.coveredLines;","            cov.lines.hit += info.calledLines;","            cov.lines.miss += (info.coveredLines - info.calledLines);","            cov.lines.percent = Math.floor((cov.lines.hit / cov.lines.total) * 100);","","            cov.functions.total += info.coveredFunctions;","            cov.functions.hit += info.calledFunctions;","            cov.functions.miss += (info.coveredFunctions - info.calledFunctions);","            cov.functions.percent = Math.floor((cov.functions.hit / cov.functions.total) * 100);","        });","","","        coverageLog = 'Lines: Hit:' + cov.lines.hit + ' Missed:' + cov.lines.miss + ' Total:' + cov.lines.total + ' Percent:' + cov.lines.percent + '%\\n';","        coverageLog += 'Functions: Hit:' + cov.functions.hit + ' Missed:' + cov.functions.miss + ' Total:' + cov.functions.total + ' Percent:' + cov.functions.percent + '%';","","        this.log('Coverage: ' + coverageLog, 'info', 'TestRunner');","    },","    /**","    * Generates a generic summary object used for Istanbul conversions.","    * @method _blankSummary","    * @return {Object} Generic summary object","    */","    _blankSummary: function () {","        return {","            lines: {","                total: 0,","                covered: 0,","                pct: 'Unknown'","            },","            statements: {","                total: 0,","                covered: 0,","                pct: 'Unknown'","            },","            functions: {","                total: 0,","                covered: 0,","                pct: 'Unknown'","            },","            branches: {","                total: 0,","                covered: 0,","                pct: 'Unknown'","            }","        };","    },","    /**","    * Calculates line numbers from statement coverage","    * @method _addDerivedInfoForFile","    * @private","    * @param {Object} fileCoverage JSON coverage data","    */","    _addDerivedInfoForFile: function (fileCoverage) {","        var statementMap = fileCoverage.statementMap,","            statements = fileCoverage.s,","            lineMap;","","        if (!fileCoverage.l) {","            fileCoverage.l = lineMap = {};","            Y.Object.each(statements, function (value, st) {","                var line = statementMap[st].start.line,","                    count = statements[st],","                    prevVal = lineMap[line];","                if (typeof prevVal === 'undefined' || prevVal < count) {","                    lineMap[line] = count;","                }","            });","        }","    },","    /**","    * Generic percent calculator","    * @method _percent","    * @param {Number} covered The covered amount","    * @param {Number} total The total","    * @private","    */","    _percent: function (covered, total) {","        var tmp, pct = 100.00;","        if (total > 0) {","            tmp = 1000 * 100 * covered / total + 5;","            pct = Math.floor(tmp / 10) / 100;","        }","        return pct;","    },","    /**","    * Summarize simple properties in the coverage data","    * @method _computSimpleTotals","    * @private","    * @param {Object} fileCoverage JSON coverage data","    * @param {String} property The property to summarize","    */","    _computeSimpleTotals: function (fileCoverage, property) {","        var stats = fileCoverage[property],","            ret = { total: 0, covered: 0 };","","        Y.Object.each(stats, function(val) {","            ret.total += 1;","            if (val) {","                ret.covered += 1;","            }","        });","        ret.pct = this._percent(ret.covered, ret.total);","        return ret;","    },","    /**","    * Noramlizes branch data from Istanbul","    * @method _computeBranchTotals","    * @private","    * @param {Object} fileCoverage JSON coverage data","    */","    _computeBranchTotals: function (fileCoverage) {","        var stats = fileCoverage.b,","            ret = { total: 0, covered: 0 };","","        Y.Object.each(stats, function (branches) {","            var covered = Y.Array.filter(branches, function (num) { return num > 0; });","            ret.total += branches.length;","            ret.covered += covered.length;","        });","        ret.pct = this._percent(ret.covered, ret.total);","        return ret;","    },","    /**","    * Takes an Istanbul coverage object, normalizes it and prints a log with a summary","    * @method parseInstanbul","    * @param {Object} coverage The coverage object to normalize and log","    */","    parseIstanbul: function (coverage) {","        var self = this,","            str = 'Coverage Report:\\n';","","        Y.Object.each(coverage, function(fileCoverage, file) {","            var ret = self._blankSummary();","","            self._addDerivedInfoForFile(fileCoverage);","            ret.lines = self._computeSimpleTotals(fileCoverage, 'l');","            ret.functions = self._computeSimpleTotals(fileCoverage, 'f');","            ret.statements = self._computeSimpleTotals(fileCoverage, 's');","            ret.branches = self._computeBranchTotals(fileCoverage);","            str += file + ':\\n';","            Y.Array.each(['lines','functions','statements','branches'], function(key) {","                str += '    ' + key +': ' + ret[key].covered + '/' + ret[key].total + ' : ' + ret[key].pct + '%\\n';","            });","","        });","        this.log(str, 'info', 'TestRunner');","","    },","    /**","    * Parses YUITest or Istanbul coverage results if they are available and logs them.","    * @method _parseCoverage","    * @private","    */","    _parseCoverage: function() {","        var coverage = Y.Test.Runner.getCoverage();","        if (!coverage) {","            return;","        }","        if (this._isIstanbul(coverage)) {","            this.parseIstanbul(coverage);","        } else {","            this.parseYUITestCoverage(coverage);","        }","    },","","    // -- Protected Event Handlers ---------------------------------------------","    _onEntry: function (e) {","        var msg = e.message;","","        if (msg.category === 'info'","                && /\\s(?:case|suite)\\s|yuitests\\d+|began/.test(msg.message)) {","            msg.category = 'status';","        } else if (msg.category === 'fail') {","            this.printBuffer();","        }","    }","}, {","    NAME: 'testConsole',","","    ATTRS: {","        entryTemplate: {","            value:","                '<div class=\"{entry_class} {cat_class} {src_class}\">' +","                    '<div class=\"{entry_content_class}\">{message}</div>' +","                '</div>'","        },","","        height: {","            value: '350px'","        },","","        newestOnTop: {","            value: false","        },","","        style: {","            value: 'block'","        },","","        width: {","            value: Y.UA.ie && Y.UA.ie < 9 ? '100%' : 'inherit'","        }","    }","});","","","}, '3.17.2', {\"requires\": [\"console-filters\", \"test\", \"array-extras\"], \"skinnable\": true});","","}());"]};
}
var __cov_MvaSoWigy9KT6gyhkkqrYQ = __coverage__['build/test-console/test-console.js'];
__cov_MvaSoWigy9KT6gyhkkqrYQ.s['1']++;YUI.add('test-console',function(Y,NAME){__cov_MvaSoWigy9KT6gyhkkqrYQ.f['1']++;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['2']++;function TestConsole(){__cov_MvaSoWigy9KT6gyhkkqrYQ.f['2']++;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['3']++;TestConsole.superclass.constructor.apply(this,arguments);}__cov_MvaSoWigy9KT6gyhkkqrYQ.s['4']++;Y.namespace('Test').Console=Y.extend(TestConsole,Y.Console,{initializer:function(config){__cov_MvaSoWigy9KT6gyhkkqrYQ.f['3']++;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['5']++;this.on('entry',this._onEntry);__cov_MvaSoWigy9KT6gyhkkqrYQ.s['6']++;this.plug(Y.Plugin.ConsoleFilters,{category:Y.merge({info:true,pass:false,fail:true,status:false},(__cov_MvaSoWigy9KT6gyhkkqrYQ.b['1'][0]++,config)&&(__cov_MvaSoWigy9KT6gyhkkqrYQ.b['1'][1]++,config.filters)||(__cov_MvaSoWigy9KT6gyhkkqrYQ.b['1'][2]++,{})),defaultVisibility:false,source:{TestRunner:true}});__cov_MvaSoWigy9KT6gyhkkqrYQ.s['7']++;Y.Test.Runner.on('complete',Y.bind(this._parseCoverage,this));},_isIstanbul:function(json){__cov_MvaSoWigy9KT6gyhkkqrYQ.f['4']++;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['8']++;var first=Y.Object.keys(json)[0],ret=false;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['9']++;if((__cov_MvaSoWigy9KT6gyhkkqrYQ.b['3'][0]++,json[first].s!==undefined)&&(__cov_MvaSoWigy9KT6gyhkkqrYQ.b['3'][1]++,json[first].fnMap!==undefined)){__cov_MvaSoWigy9KT6gyhkkqrYQ.b['2'][0]++;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['10']++;ret=true;}else{__cov_MvaSoWigy9KT6gyhkkqrYQ.b['2'][1]++;}__cov_MvaSoWigy9KT6gyhkkqrYQ.s['11']++;if((__cov_MvaSoWigy9KT6gyhkkqrYQ.b['5'][0]++,json.s!==undefined)&&(__cov_MvaSoWigy9KT6gyhkkqrYQ.b['5'][1]++,json.fnMap!==undefined)){__cov_MvaSoWigy9KT6gyhkkqrYQ.b['4'][0]++;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['12']++;ret=true;}else{__cov_MvaSoWigy9KT6gyhkkqrYQ.b['4'][1]++;}__cov_MvaSoWigy9KT6gyhkkqrYQ.s['13']++;return ret;},parseYUITestCoverage:function(coverage){__cov_MvaSoWigy9KT6gyhkkqrYQ.f['5']++;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['14']++;var cov={lines:{hit:0,miss:0,total:0,percent:0},functions:{hit:0,miss:0,total:0,percent:0}},coverageLog;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['15']++;Y.Object.each(coverage,function(info){__cov_MvaSoWigy9KT6gyhkkqrYQ.f['6']++;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['16']++;cov.lines.total+=info.coveredLines;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['17']++;cov.lines.hit+=info.calledLines;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['18']++;cov.lines.miss+=info.coveredLines-info.calledLines;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['19']++;cov.lines.percent=Math.floor(cov.lines.hit/cov.lines.total*100);__cov_MvaSoWigy9KT6gyhkkqrYQ.s['20']++;cov.functions.total+=info.coveredFunctions;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['21']++;cov.functions.hit+=info.calledFunctions;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['22']++;cov.functions.miss+=info.coveredFunctions-info.calledFunctions;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['23']++;cov.functions.percent=Math.floor(cov.functions.hit/cov.functions.total*100);});__cov_MvaSoWigy9KT6gyhkkqrYQ.s['24']++;coverageLog='Lines: Hit:'+cov.lines.hit+' Missed:'+cov.lines.miss+' Total:'+cov.lines.total+' Percent:'+cov.lines.percent+'%\n';__cov_MvaSoWigy9KT6gyhkkqrYQ.s['25']++;coverageLog+='Functions: Hit:'+cov.functions.hit+' Missed:'+cov.functions.miss+' Total:'+cov.functions.total+' Percent:'+cov.functions.percent+'%';__cov_MvaSoWigy9KT6gyhkkqrYQ.s['26']++;this.log('Coverage: '+coverageLog,'info','TestRunner');},_blankSummary:function(){__cov_MvaSoWigy9KT6gyhkkqrYQ.f['7']++;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['27']++;return{lines:{total:0,covered:0,pct:'Unknown'},statements:{total:0,covered:0,pct:'Unknown'},functions:{total:0,covered:0,pct:'Unknown'},branches:{total:0,covered:0,pct:'Unknown'}};},_addDerivedInfoForFile:function(fileCoverage){__cov_MvaSoWigy9KT6gyhkkqrYQ.f['8']++;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['28']++;var statementMap=fileCoverage.statementMap,statements=fileCoverage.s,lineMap;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['29']++;if(!fileCoverage.l){__cov_MvaSoWigy9KT6gyhkkqrYQ.b['6'][0]++;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['30']++;fileCoverage.l=lineMap={};__cov_MvaSoWigy9KT6gyhkkqrYQ.s['31']++;Y.Object.each(statements,function(value,st){__cov_MvaSoWigy9KT6gyhkkqrYQ.f['9']++;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['32']++;var line=statementMap[st].start.line,count=statements[st],prevVal=lineMap[line];__cov_MvaSoWigy9KT6gyhkkqrYQ.s['33']++;if((__cov_MvaSoWigy9KT6gyhkkqrYQ.b['8'][0]++,typeof prevVal==='undefined')||(__cov_MvaSoWigy9KT6gyhkkqrYQ.b['8'][1]++,prevVal<count)){__cov_MvaSoWigy9KT6gyhkkqrYQ.b['7'][0]++;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['34']++;lineMap[line]=count;}else{__cov_MvaSoWigy9KT6gyhkkqrYQ.b['7'][1]++;}});}else{__cov_MvaSoWigy9KT6gyhkkqrYQ.b['6'][1]++;}},_percent:function(covered,total){__cov_MvaSoWigy9KT6gyhkkqrYQ.f['10']++;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['35']++;var tmp,pct=100;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['36']++;if(total>0){__cov_MvaSoWigy9KT6gyhkkqrYQ.b['9'][0]++;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['37']++;tmp=1000*100*covered/total+5;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['38']++;pct=Math.floor(tmp/10)/100;}else{__cov_MvaSoWigy9KT6gyhkkqrYQ.b['9'][1]++;}__cov_MvaSoWigy9KT6gyhkkqrYQ.s['39']++;return pct;},_computeSimpleTotals:function(fileCoverage,property){__cov_MvaSoWigy9KT6gyhkkqrYQ.f['11']++;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['40']++;var stats=fileCoverage[property],ret={total:0,covered:0};__cov_MvaSoWigy9KT6gyhkkqrYQ.s['41']++;Y.Object.each(stats,function(val){__cov_MvaSoWigy9KT6gyhkkqrYQ.f['12']++;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['42']++;ret.total+=1;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['43']++;if(val){__cov_MvaSoWigy9KT6gyhkkqrYQ.b['10'][0]++;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['44']++;ret.covered+=1;}else{__cov_MvaSoWigy9KT6gyhkkqrYQ.b['10'][1]++;}});__cov_MvaSoWigy9KT6gyhkkqrYQ.s['45']++;ret.pct=this._percent(ret.covered,ret.total);__cov_MvaSoWigy9KT6gyhkkqrYQ.s['46']++;return ret;},_computeBranchTotals:function(fileCoverage){__cov_MvaSoWigy9KT6gyhkkqrYQ.f['13']++;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['47']++;var stats=fileCoverage.b,ret={total:0,covered:0};__cov_MvaSoWigy9KT6gyhkkqrYQ.s['48']++;Y.Object.each(stats,function(branches){__cov_MvaSoWigy9KT6gyhkkqrYQ.f['14']++;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['49']++;var covered=Y.Array.filter(branches,function(num){__cov_MvaSoWigy9KT6gyhkkqrYQ.f['15']++;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['50']++;return num>0;});__cov_MvaSoWigy9KT6gyhkkqrYQ.s['51']++;ret.total+=branches.length;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['52']++;ret.covered+=covered.length;});__cov_MvaSoWigy9KT6gyhkkqrYQ.s['53']++;ret.pct=this._percent(ret.covered,ret.total);__cov_MvaSoWigy9KT6gyhkkqrYQ.s['54']++;return ret;},parseIstanbul:function(coverage){__cov_MvaSoWigy9KT6gyhkkqrYQ.f['16']++;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['55']++;var self=this,str='Coverage Report:\n';__cov_MvaSoWigy9KT6gyhkkqrYQ.s['56']++;Y.Object.each(coverage,function(fileCoverage,file){__cov_MvaSoWigy9KT6gyhkkqrYQ.f['17']++;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['57']++;var ret=self._blankSummary();__cov_MvaSoWigy9KT6gyhkkqrYQ.s['58']++;self._addDerivedInfoForFile(fileCoverage);__cov_MvaSoWigy9KT6gyhkkqrYQ.s['59']++;ret.lines=self._computeSimpleTotals(fileCoverage,'l');__cov_MvaSoWigy9KT6gyhkkqrYQ.s['60']++;ret.functions=self._computeSimpleTotals(fileCoverage,'f');__cov_MvaSoWigy9KT6gyhkkqrYQ.s['61']++;ret.statements=self._computeSimpleTotals(fileCoverage,'s');__cov_MvaSoWigy9KT6gyhkkqrYQ.s['62']++;ret.branches=self._computeBranchTotals(fileCoverage);__cov_MvaSoWigy9KT6gyhkkqrYQ.s['63']++;str+=file+':\n';__cov_MvaSoWigy9KT6gyhkkqrYQ.s['64']++;Y.Array.each(['lines','functions','statements','branches'],function(key){__cov_MvaSoWigy9KT6gyhkkqrYQ.f['18']++;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['65']++;str+='    '+key+': '+ret[key].covered+'/'+ret[key].total+' : '+ret[key].pct+'%\n';});});__cov_MvaSoWigy9KT6gyhkkqrYQ.s['66']++;this.log(str,'info','TestRunner');},_parseCoverage:function(){__cov_MvaSoWigy9KT6gyhkkqrYQ.f['19']++;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['67']++;var coverage=Y.Test.Runner.getCoverage();__cov_MvaSoWigy9KT6gyhkkqrYQ.s['68']++;if(!coverage){__cov_MvaSoWigy9KT6gyhkkqrYQ.b['11'][0]++;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['69']++;return;}else{__cov_MvaSoWigy9KT6gyhkkqrYQ.b['11'][1]++;}__cov_MvaSoWigy9KT6gyhkkqrYQ.s['70']++;if(this._isIstanbul(coverage)){__cov_MvaSoWigy9KT6gyhkkqrYQ.b['12'][0]++;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['71']++;this.parseIstanbul(coverage);}else{__cov_MvaSoWigy9KT6gyhkkqrYQ.b['12'][1]++;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['72']++;this.parseYUITestCoverage(coverage);}},_onEntry:function(e){__cov_MvaSoWigy9KT6gyhkkqrYQ.f['20']++;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['73']++;var msg=e.message;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['74']++;if((__cov_MvaSoWigy9KT6gyhkkqrYQ.b['14'][0]++,msg.category==='info')&&(__cov_MvaSoWigy9KT6gyhkkqrYQ.b['14'][1]++,/\s(?:case|suite)\s|yuitests\d+|began/.test(msg.message))){__cov_MvaSoWigy9KT6gyhkkqrYQ.b['13'][0]++;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['75']++;msg.category='status';}else{__cov_MvaSoWigy9KT6gyhkkqrYQ.b['13'][1]++;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['76']++;if(msg.category==='fail'){__cov_MvaSoWigy9KT6gyhkkqrYQ.b['15'][0]++;__cov_MvaSoWigy9KT6gyhkkqrYQ.s['77']++;this.printBuffer();}else{__cov_MvaSoWigy9KT6gyhkkqrYQ.b['15'][1]++;}}}},{NAME:'testConsole',ATTRS:{entryTemplate:{value:'<div class="{entry_class} {cat_class} {src_class}">'+'<div class="{entry_content_class}">{message}</div>'+'</div>'},height:{value:'350px'},newestOnTop:{value:false},style:{value:'block'},width:{value:(__cov_MvaSoWigy9KT6gyhkkqrYQ.b['17'][0]++,Y.UA.ie)&&(__cov_MvaSoWigy9KT6gyhkkqrYQ.b['17'][1]++,Y.UA.ie<9)?(__cov_MvaSoWigy9KT6gyhkkqrYQ.b['16'][0]++,'100%'):(__cov_MvaSoWigy9KT6gyhkkqrYQ.b['16'][1]++,'inherit')}}});},'3.17.2',{'requires':['console-filters','test','array-extras'],'skinnable':true});
