summaryrefslogtreecommitdiffstats
path: root/js/yui3/test-console
diff options
context:
space:
mode:
authorDave Lawrence <dlawrence@mozilla.com>2012-12-04 22:13:12 +0100
committerDave Lawrence <dlawrence@mozilla.com>2012-12-04 22:13:12 +0100
commit1ee605864f227d40cc83e798dc117ad8e01acb64 (patch)
tree42cc3ff5007202fad4932941b477ac96d5ea0643 /js/yui3/test-console
parentb061ce481380dfd01f85ea84ef700eb7589433e3 (diff)
downloadbugzilla-1ee605864f227d40cc83e798dc117ad8e01acb64.tar.gz
bugzilla-1ee605864f227d40cc83e798dc117ad8e01acb64.tar.xz
Bug 818091 - Install a full copy of YUI3 into the js directory for use with new extensions/projects
Diffstat (limited to 'js/yui3/test-console')
-rw-r--r--js/yui3/test-console/assets/skins/sam/test-console.css7
-rw-r--r--js/yui3/test-console/assets/test-console-core.css14
-rw-r--r--js/yui3/test-console/test-console-min.js7
3 files changed, 28 insertions, 0 deletions
diff --git a/js/yui3/test-console/assets/skins/sam/test-console.css b/js/yui3/test-console/assets/skins/sam/test-console.css
new file mode 100644
index 000000000..9f1fb25dc
--- /dev/null
+++ b/js/yui3/test-console/assets/skins/sam/test-console.css
@@ -0,0 +1,7 @@
+/*
+YUI 3.7.3 (build 5687)
+Copyright 2012 Yahoo! Inc. All rights reserved.
+Licensed under the BSD License.
+http://yuilibrary.com/license/
+*/
+.yui3-testconsole .yui3-console-entry{min-height:inherit;padding:5px}.yui3-testconsole .yui3-console-controls{display:none}.yui3-skin-sam .yui3-testconsole .yui3-console-content,.yui3-skin-sam .yui3-testconsole .yui3-console-bd,.yui3-skin-sam .yui3-testconsole .yui3-console-entry,.yui3-skin-sam .yui3-testconsole .yui3-console-ft,.yui3-skin-sam .yui3-testconsole .yui3-console-ft .yui3-console-filters-categories,.yui3-skin-sam .yui3-testconsole .yui3-console-ft .yui3-console-filters-sources,.yui3-skin-sam .yui3-testconsole .yui3-console-hd{background:0;border:0;-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.yui3-skin-sam .yui3-testconsole-content,.yui3-skin-sam .yui3-testconsole .yui3-console-bd{color:#333;font:13px/1.4 Helvetica,'DejaVu Sans','Bitstream Vera Sans',Arial,sans-serif}.yui3-skin-sam .yui3-testconsole-content{border:1px solid #afafaf}.yui3-skin-sam .yui3-testconsole .yui3-console-entry{border-bottom:1px solid #eaeaea;font-family:Menlo,Inconsolata,Consolas,'DejaVu Mono','Bitstream Vera Sans Mono',monospace;font-size:11px}.yui3-skin-sam .yui3-testconsole .yui3-console-ft{border-top:1px solid}.yui3-skin-sam .yui3-testconsole .yui3-console-hd{border-bottom:1px solid;*zoom:1}.yui3-skin-sam .yui3-testconsole.yui3-console-collapsed .yui3-console-hd{border:0}.yui3-skin-sam .yui3-testconsole .yui3-console-ft,.yui3-skin-sam .yui3-testconsole .yui3-console-hd{border-color:#cfcfcf}.yui3-skin-sam .yui3-testconsole .yui3-testconsole-entry-fail{background-color:#ffe0e0;border-bottom-color:#ffc5c4}.yui3-skin-sam .yui3-testconsole .yui3-testconsole-entry-pass{background-color:#ecffea;border-bottom-color:#d1ffcc}#yui3-css-stamp.skin-sam-test-console{display:none}
diff --git a/js/yui3/test-console/assets/test-console-core.css b/js/yui3/test-console/assets/test-console-core.css
new file mode 100644
index 000000000..00ad9b583
--- /dev/null
+++ b/js/yui3/test-console/assets/test-console-core.css
@@ -0,0 +1,14 @@
+/*
+YUI 3.7.3 (build 5687)
+Copyright 2012 Yahoo! Inc. All rights reserved.
+Licensed under the BSD License.
+http://yuilibrary.com/license/
+*/
+.yui3-testconsole .yui3-console-entry {
+ min-height: inherit;
+ padding: 5px;
+}
+
+.yui3-testconsole .yui3-console-controls {
+ display: none;
+}
diff --git a/js/yui3/test-console/test-console-min.js b/js/yui3/test-console/test-console-min.js
new file mode 100644
index 000000000..eb0653158
--- /dev/null
+++ b/js/yui3/test-console/test-console-min.js
@@ -0,0 +1,7 @@
+/*
+YUI 3.7.3 (build 5687)
+Copyright 2012 Yahoo! Inc. All rights reserved.
+Licensed under the BSD License.
+http://yuilibrary.com/license/
+*/
+YUI.add("test-console",function(e,t){function n(){n.superclass.constructor.apply(this,arguments)}e.namespace("Test").Console=e.extend(n,e.Console,{initializer:function(t){this.on("entry",this._onEntry),this.plug(e.Plugin.ConsoleFilters,{category:e.merge({info:!0,pass:!1,fail:!0,status:!1},t&&t.filters||{}),defaultVisibility:!1,source:{TestRunner:!0}}),e.Test.Runner.on("complete",e.bind(this._parseCoverage,this))},_isIstanbul:function(e){var t=Object.keys(e)[0],n=!1;return e[t].s!==undefined&&e[t].fnMap!==undefined&&(n=!0),e.s!==undefined&&e.fnMap!==undefined&&(n=!0),n},parseYUITestCoverage:function(t){var n={lines:{hit:0,miss:0,total:0,percent:0},functions:{hit:0,miss:0,total:0,percent:0}},r;e.Object.each(t,function(e){n.lines.total+=e.coveredLines,n.lines.hit+=e.calledLines,n.lines.miss+=e.coveredLines-e.calledLines,n.lines.percent=Math.floor(n.lines.hit/n.lines.total*100),n.functions.total+=e.coveredFunctions,n.functions.hit+=e.calledFunctions,n.functions.miss+=e.coveredFunctions-e.calledFunctions,n.functions.percent=Math.floor(n.functions.hit/n.functions.total*100)}),r="Lines: Hit:"+n.lines.hit+" Missed:"+n.lines.miss+" Total:"+n.lines.total+" Percent:"+n.lines.percent+"%\n",r+="Functions: Hit:"+n.functions.hit+" Missed:"+n.functions.miss+" Total:"+n.functions.total+" Percent:"+n.functions.percent+"%",this.log("Coverage: "+r,"info","TestRunner")},_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"}}},_addDerivedInfoForFile:function(t){var n=t.statementMap,r=t.s,i;t.l||(t.l=i={},e.Object.each(r,function(e,t){var s=n[t].start.line,o=r[t],u=i[s];if(typeof u=="undefined"||u<o)i[s]=o}))},_percent:function(e,t){var n,r=100;return t>0&&(n=1e5*e/t+5,r=Math.floor(n/10)/100),r},_computeSimpleTotals:function(t,n){var r=t[n],i={total:0,covered:0};return e.Object.each(r,function(e){i.total+=1,e&&(i.covered+=1)}),i.pct=this._percent(i.covered,i.total),i},_computeBranchTotals:function(t){var n=t.b,r={total:0,covered:0};return e.Object.each(n,function(t){var n=e.Array.filter(t,function(e){return e>0});r.total+=t.length,r.covered+=n.length}),r.pct=this._percent(r.covered,r.total),r},parseIstanbul:function(t){var n=this,r="Coverage Report:\n";e.Object.each(t,function(t,i){var s=n._blankSummary();n._addDerivedInfoForFile(t),s.lines=n._computeSimpleTotals(t,"l"),s.functions=n._computeSimpleTotals(t,"f"),s.statements=n._computeSimpleTotals(t,"s"),s.branches=n._computeBranchTotals(t),r+=i+":\n",e.Array.each(["lines","functions","statements","branches"],function(e){r+=" "+e+": "+s[e].covered+"/"+s[e].total+" : "+s[e].pct+"%\n"})}),this.log(r,"info","TestRunner")},_parseCoverage:function(){var t=e.Test.Runner.getCoverage();if(!t)return;this._isIstanbul(t)?this.parseIstanbul(t):this.parseYUITestCoverage(t)},_onEntry:function(e){var t=e.message;t.category==="info"&&/\s(?:case|suite)\s|yuitests\d+|began/.test(t.message)?t.category="status":t.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:!1},style:{value:"block"},width:{value:e.UA.ie&&e.UA.ie<9?"100%":"inherit"}}})},"3.7.3",{requires:["console-filters","test","array-extras"],skinnable:!0});