Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Rng.io to run all tests regardless of failures of previous rings. Clo…

…ses gh-51, Closes gh-33
  • Loading branch information...
commit b04b78bfff23b7e733884bc0b49c138e50c85ddc 1 parent aadcc35
@rwaldron rwaldron authored
View
3  dist/h.js
@@ -530,6 +530,9 @@
};
// `params` initialized at top of program file
+ // Force all rings to run, all the time.
+ params.push({ key: "all", value: true });
+
if ( params ) {
params.forEach(function( obj ) {
runnerConfig[ obj.key ] = obj.value;
View
2  dist/h.min.js
@@ -1,3 +1,3 @@
/*! Ringmark - v1.4.0 - 2/23/2013
* Copyright ( c ) 2013 Facebook Licensed W3C 3-clause BSD License, W3C Test Suite License */
-(function(a){var b=[].slice,c={}.toString,d={}.hasOwnProperty,e={},f=["Object","Number","String","Boolean","Function","RegExp","Array","Date","Error"],g=function(a){var b=a.location&&a.location.search||"";return b.replace(/^\?/,"").split("&").map(function(a){var b=a.split("=");return{key:b[0],value:b[1]||!0}})}(a),h=[],i=[],j={nop:function(){},uniqueId:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(a){var b=Math.random()*16|0;return(a==="x"?b:b&3|8).toString(16)}).toUpperCase()},isKindOf:function(a,b){return a!=null&&c.call(a)==="[object "+b+"]"},kindOf:function(a){return a!=null&&/^\[object (.*)\]$/.exec(c.call(a))[1]},clone:function(a){var b,c,d,e=[];if(Array.isArray(a)){for(d=0,c=a.length;d<c;d++)b=a[d],typeof b=="object"&&(b=j.clone(b)),e[d]=b;return e}return Object.create({},function(a){var b={};return Object.getOwnPropertyNames(a).forEach(function(c){var d=Object.getOwnPropertyDescriptor(a,c);typeof a[c]=="object"&&(d.value=j.clone(a[c])),b[c]=d}),b}(a))},extend:function(a){var c,d,e=b.call(arguments,1),f=e.length,g=0;for(;g<f;g++){c=j.clone(e[g]);for(d in c)a[d]=c[d]}return a}},k=" -webkit- -moz- -o- -ms- ".split(" "),l="Webkit Moz O ms",m=l.split(" "),n=l.toLowerCase().split(" ");m.push("WebKit","Moz","MS","O"),n.push("WebKit","Moz","MS","O"),f.forEach(function(a){e["[object "+a+"]"]=a,j["is"+a]=function(b){return j.kindOf(b)===a}}),j.isHTML=function(a){return a=a.trim(),a.charAt(0)==="<"&&a.charAt(a.length-1)===">"&&a.length>=3},j.prefixes={css:k,dom:n,cssom:m,expandCss:function(a,b){return k.join(a+";")+(b||"")}},j.get={string:function(a,b){return!!~(""+a).indexOf(b)},cssProp:function(a,b,c){var d,e,f,g;c=c||!1;if(!c)return b in a.style;d=b.charAt(0).toUpperCase()+b.substr(1),e=(b+" "+m.join(d+" ")+d).split(" "),f=0,g=e.length;for(f=0;f<g;f++)if(e[f]in a.style)return!0;return!1},domProp:function(a,b,c){var d,e,f,g;c=c||!1;if(!c)return a[b]!==undefined?a[b]:!1;d=b.charAt(0).toUpperCase()+b.substr(1),e=(b+" "+n.join(d+" ")+d).split(" "),f=0,g=e.length;for(f=0;f<g;f++)if(e[f]in a)return a[e[f]];return!1}},j.inject=function(a,b){var c,d,e;return typeof b=="string"&&(j.isHTML(b)?(d=/^<(\w+)\s*\/?>(?:<\/\1>)?$/.exec(b),d&&d.length&&d[1]&&(b=document.createElement(d[1]))):b=document.querySelector(b)),typeof a=="string"?(j.isHTML(a)&&!/^<style/.test(a)?c="innerHTML":(c="innerText"in b?"innerText":"textContent",/^<style/.test(a)&&(c="textContent")),b[c]+=a):a.nodeType===1&&b.appendChild(a),b},j.hostAPI=function(a,b){return j.get.domProp(window,a,b)||!1},j.API=function(a,b,c,d){var e;return arguments.length===1&&("expect"in a&&(d=a.expect),"withPrefixes"in a&&(c=a.withPrefixes),b=a.api,a=a.host),!a||a==null?undefined:(e=j.get.domProp(a,b,c),arguments.length!==1&&arguments.length!==4||e!==d?e||undefined:e)},j.simulate=function(a,b,c){var d;a==="click"?(d=document.createEvent("MouseEvents"),d.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null)):(d=document.createEvent("HTMLEvents"),d.initEvent(a,!0,!1)),d.synthetic=!0,c&&j.extend(d,c),b.dispatchEvent(d)},j.on=function(a,b){(i[a]||(i[a]=[])).push(b)},j.once=function(a,b){function c(){b.apply(this,arguments),j.off(a,b)}j.on(a,c)},j.off=function(a,b){var c=i[a];c&&(b?c.splice(c.indexOf(b),1):i[a]=[])},j.emit=function(a){var b=0,c=[].slice.call(arguments,1),d=i[a]||[],e=d.length;for(;b<e;b++)d[b]&&d[b].apply(this,c)},[["on","addEventListener"],["off","removeEventListener"]].forEach(function(a){var b,c,d;b=a[0],c=a[1],d=j[b],j[b]=function(){var a,b,e,f;if(typeof arguments[0]=="string")return d.apply(j,[].slice.call(arguments));a=arguments[0],b=arguments[1],e=arguments[2],f=arguments[3]||!1,a[c]&&a[c].call(a,b,e,f)}}),j.results={};var o=0,p={all:!1};j.ring=function(a){j.ring.cache.push(a)},j.ring.cache=[],j.ring.getCount=function(a){var b=j.ring.cache[a];return b&&b.features||0},j.ring.totals=function(){return a.QUnit.config.stats},j.next=function(){var b=j.ring.cache[o];b&&b.test(),setTimeout(function(){a.QUnit.start()},1e3)},j.start=function(){j.next(),j.emit("runner:start")},j.on("runner:done",function(){if(a.Rng&&a.Rng.isFake)return;a.QUnit.config.autorun=!1,a.QUnit.config.blocking=!1,a.QUnit.config.semaphore=0,a.QUnit.load()}),j.on("runner:ringDone",function(b){console.log("exports.Rng!!!!!!!",a.Rng);if(a.Rng&&a.Rng.isFake)return;a.QUnit&&(["previousFeature","previousModule","previousRing","currentFeature","currentModule"].forEach(function(b){a.QUnit.config[b]=""}),a.QUnit.config.autorun=!1,a.QUnit.config.blocking=!1,a.QUnit.config.semaphore=0,a.QUnit.stop(),console.log("Stopped ("+o+")"),console.log("Waiting...")),o++,(p.all||b.failed===0)&&j.next()}),j.Runner=function(){},j.Runner.config=function(b,c){QUnit.config[b]&&(a.QUnit.config[b]=c),p[b]=c},g&&g.forEach(function(a){p[a.key]=a.value}),j.prefixes.expand=j.prefixes.expandCss,j.test=j.check=j.get,a.TopHat=a.Hat=a.H=j})(typeof exports=="object"&&exports||this),function(a,b){function g(a){var b;for(b in a)this[b]=a[b];this.history=[Math.PI*1.5]}var c=[],d={},e={running:"255, 255, 255",clear:"255, 255, 255",pass:"0, 199, 59",fail:"182, 184, 186"},f={nomore:"No more ticks available for this ring"};g.prototype.draw=function(a,b,c,d){var e="rgba("+c+", "+d+")";this.ctx.beginPath(),this.ctx.arc(this.ctx.canvas.width/2,this.ctx.canvas.height/2,this.radius,a,b,!1),this.ctx.strokeStyle=e,this.ctx.lineWidth=this.line,this.ctx.stroke(),this.ctx.closePath()},g.prototype.tick=function(a,b){if(this.history.length>this.ticks){console.log(f.nomore);return}if(!a||typeof a!="string")b=a,a="tick";var c=this.history[this.history.length-1],d=c+this.step,g=1,h=e.running;b&&(h=e[b.failed?"fail":"pass"]),this.draw(c,d+.009,h,g),a==="tick"&&(this.draw(c,d+.009,h,g),this.history.push(d))},g.trace=function(){var a,b,e=document.createElement("canvas"),f={width:null,height:null},h=function(){var a;for(a in d)return d[a].canvas}();e.style.position="relative",e.style.top="-305px",e.style.left="-5px",e.width=h.width+10,e.height=h.height+10,h.parentNode.insertBefore(e,h.nextSibling),a=e.getContext("2d"),f.width=a.canvas.width/2,f.height=a.canvas.height/2,b=g.get(0).line*c.length+1,a.fillRect(f.width-4,10,8,b),a.fillRect(f.width+65,f.height-10,b,21),a.font="bold 12px Helvetica",c.concat([{line:25}]).forEach(function(b,d){a.beginPath(),a.arc(f.width,f.height-3,b.line*(d+1)+40,Math.PI*2,0,!1),a.strokeStyle="rgba( 0, 0, 0, 1 )",a.lineWidth=8,a.stroke(),a.closePath(),a.fillStyle="rgba( 255, 255, 255, 1 )",d<c.length&&a.fillText("r."+d,f.width+(b.line*(d+1)+45),f.height+5)})},g.create=function(b,e){var f,h=a.Ring.config;return e.index==null&&(e.index=c.length),e.ticks==null&&(e.ticks=0),e.diameter=h.diameter.next||h.diameter.initial,h.diameter.next=(h.diameter.next||h.diameter.initial)+h.diameter.padding*2,e.radius=e.diameter/2,!(e.index>0),e.line=h.line.initial,e.circ=e.diameter*Math.PI,e.step=Math.PI*2/e.ticks,d[b]||(d[b]=document.getElementById(b).getContext("2d")),e.ctx=d[b],c.push(new g(e)),c[c.length-1]},g.create.all=function(a){b.ring.cache.length&&(b.ring.cache.forEach(function(b){g.create(a,{ticks:b.features})}),g.trace())},g.get=function(a){return a!=null&&c[a]},g.config={diameter:{padding:25,initial:150,next:0},line:{initial:25}},typeof global!="undefined"&&(g.config.contexts={},d=g.config.contexts),a.Ring=g,a.Hat&&(a.Hat.Ring=a.Ring)}(typeof exports=="object"&&exports||this,this.Hat||{});
+(function(a){var b=[].slice,c={}.toString,d={}.hasOwnProperty,e={},f=["Object","Number","String","Boolean","Function","RegExp","Array","Date","Error"],g=function(a){var b=a.location&&a.location.search||"";return b.replace(/^\?/,"").split("&").map(function(a){var b=a.split("=");return{key:b[0],value:b[1]||!0}})}(a),h=[],i=[],j={nop:function(){},uniqueId:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(a){var b=Math.random()*16|0;return(a==="x"?b:b&3|8).toString(16)}).toUpperCase()},isKindOf:function(a,b){return a!=null&&c.call(a)==="[object "+b+"]"},kindOf:function(a){return a!=null&&/^\[object (.*)\]$/.exec(c.call(a))[1]},clone:function(a){var b,c,d,e=[];if(Array.isArray(a)){for(d=0,c=a.length;d<c;d++)b=a[d],typeof b=="object"&&(b=j.clone(b)),e[d]=b;return e}return Object.create({},function(a){var b={};return Object.getOwnPropertyNames(a).forEach(function(c){var d=Object.getOwnPropertyDescriptor(a,c);typeof a[c]=="object"&&(d.value=j.clone(a[c])),b[c]=d}),b}(a))},extend:function(a){var c,d,e=b.call(arguments,1),f=e.length,g=0;for(;g<f;g++){c=j.clone(e[g]);for(d in c)a[d]=c[d]}return a}},k=" -webkit- -moz- -o- -ms- ".split(" "),l="Webkit Moz O ms",m=l.split(" "),n=l.toLowerCase().split(" ");m.push("WebKit","Moz","MS","O"),n.push("WebKit","Moz","MS","O"),f.forEach(function(a){e["[object "+a+"]"]=a,j["is"+a]=function(b){return j.kindOf(b)===a}}),j.isHTML=function(a){return a=a.trim(),a.charAt(0)==="<"&&a.charAt(a.length-1)===">"&&a.length>=3},j.prefixes={css:k,dom:n,cssom:m,expandCss:function(a,b){return k.join(a+";")+(b||"")}},j.get={string:function(a,b){return!!~(""+a).indexOf(b)},cssProp:function(a,b,c){var d,e,f,g;c=c||!1;if(!c)return b in a.style;d=b.charAt(0).toUpperCase()+b.substr(1),e=(b+" "+m.join(d+" ")+d).split(" "),f=0,g=e.length;for(f=0;f<g;f++)if(e[f]in a.style)return!0;return!1},domProp:function(a,b,c){var d,e,f,g;c=c||!1;if(!c)return a[b]!==undefined?a[b]:!1;d=b.charAt(0).toUpperCase()+b.substr(1),e=(b+" "+n.join(d+" ")+d).split(" "),f=0,g=e.length;for(f=0;f<g;f++)if(e[f]in a)return a[e[f]];return!1}},j.inject=function(a,b){var c,d,e;return typeof b=="string"&&(j.isHTML(b)?(d=/^<(\w+)\s*\/?>(?:<\/\1>)?$/.exec(b),d&&d.length&&d[1]&&(b=document.createElement(d[1]))):b=document.querySelector(b)),typeof a=="string"?(j.isHTML(a)&&!/^<style/.test(a)?c="innerHTML":(c="innerText"in b?"innerText":"textContent",/^<style/.test(a)&&(c="textContent")),b[c]+=a):a.nodeType===1&&b.appendChild(a),b},j.hostAPI=function(a,b){return j.get.domProp(window,a,b)||!1},j.API=function(a,b,c,d){var e;return arguments.length===1&&("expect"in a&&(d=a.expect),"withPrefixes"in a&&(c=a.withPrefixes),b=a.api,a=a.host),!a||a==null?undefined:(e=j.get.domProp(a,b,c),arguments.length!==1&&arguments.length!==4||e!==d?e||undefined:e)},j.simulate=function(a,b,c){var d;a==="click"?(d=document.createEvent("MouseEvents"),d.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null)):(d=document.createEvent("HTMLEvents"),d.initEvent(a,!0,!1)),d.synthetic=!0,c&&j.extend(d,c),b.dispatchEvent(d)},j.on=function(a,b){(i[a]||(i[a]=[])).push(b)},j.once=function(a,b){function c(){b.apply(this,arguments),j.off(a,b)}j.on(a,c)},j.off=function(a,b){var c=i[a];c&&(b?c.splice(c.indexOf(b),1):i[a]=[])},j.emit=function(a){var b=0,c=[].slice.call(arguments,1),d=i[a]||[],e=d.length;for(;b<e;b++)d[b]&&d[b].apply(this,c)},[["on","addEventListener"],["off","removeEventListener"]].forEach(function(a){var b,c,d;b=a[0],c=a[1],d=j[b],j[b]=function(){var a,b,e,f;if(typeof arguments[0]=="string")return d.apply(j,[].slice.call(arguments));a=arguments[0],b=arguments[1],e=arguments[2],f=arguments[3]||!1,a[c]&&a[c].call(a,b,e,f)}}),j.results={};var o=0,p={all:!1};j.ring=function(a){j.ring.cache.push(a)},j.ring.cache=[],j.ring.getCount=function(a){var b=j.ring.cache[a];return b&&b.features||0},j.ring.totals=function(){return a.QUnit.config.stats},j.next=function(){var b=j.ring.cache[o];b&&b.test(),setTimeout(function(){a.QUnit.start()},1e3)},j.start=function(){j.next(),j.emit("runner:start")},j.on("runner:done",function(){if(a.Rng&&a.Rng.isFake)return;a.QUnit.config.autorun=!1,a.QUnit.config.blocking=!1,a.QUnit.config.semaphore=0,a.QUnit.load()}),j.on("runner:ringDone",function(b){console.log("exports.Rng!!!!!!!",a.Rng);if(a.Rng&&a.Rng.isFake)return;a.QUnit&&(["previousFeature","previousModule","previousRing","currentFeature","currentModule"].forEach(function(b){a.QUnit.config[b]=""}),a.QUnit.config.autorun=!1,a.QUnit.config.blocking=!1,a.QUnit.config.semaphore=0,a.QUnit.stop(),console.log("Stopped ("+o+")"),console.log("Waiting...")),o++,(p.all||b.failed===0)&&j.next()}),j.Runner=function(){},j.Runner.config=function(b,c){QUnit.config[b]&&(a.QUnit.config[b]=c),p[b]=c},g.push({key:"all",value:!0}),g&&g.forEach(function(a){p[a.key]=a.value}),j.prefixes.expand=j.prefixes.expandCss,j.test=j.check=j.get,a.TopHat=a.Hat=a.H=j})(typeof exports=="object"&&exports||this),function(a,b){function g(a){var b;for(b in a)this[b]=a[b];this.history=[Math.PI*1.5]}var c=[],d={},e={running:"255, 255, 255",clear:"255, 255, 255",pass:"0, 199, 59",fail:"182, 184, 186"},f={nomore:"No more ticks available for this ring"};g.prototype.draw=function(a,b,c,d){var e="rgba("+c+", "+d+")";this.ctx.beginPath(),this.ctx.arc(this.ctx.canvas.width/2,this.ctx.canvas.height/2,this.radius,a,b,!1),this.ctx.strokeStyle=e,this.ctx.lineWidth=this.line,this.ctx.stroke(),this.ctx.closePath()},g.prototype.tick=function(a,b){if(this.history.length>this.ticks){console.log(f.nomore);return}if(!a||typeof a!="string")b=a,a="tick";var c=this.history[this.history.length-1],d=c+this.step,g=1,h=e.running;b&&(h=e[b.failed?"fail":"pass"]),this.draw(c,d+.009,h,g),a==="tick"&&(this.draw(c,d+.009,h,g),this.history.push(d))},g.trace=function(){var a,b,e=document.createElement("canvas"),f={width:null,height:null},h=function(){var a;for(a in d)return d[a].canvas}();e.style.position="relative",e.style.top="-305px",e.style.left="-5px",e.width=h.width+10,e.height=h.height+10,h.parentNode.insertBefore(e,h.nextSibling),a=e.getContext("2d"),f.width=a.canvas.width/2,f.height=a.canvas.height/2,b=g.get(0).line*c.length+1,a.fillRect(f.width-4,10,8,b),a.fillRect(f.width+65,f.height-10,b,21),a.font="bold 12px Helvetica",c.concat([{line:25}]).forEach(function(b,d){a.beginPath(),a.arc(f.width,f.height-3,b.line*(d+1)+40,Math.PI*2,0,!1),a.strokeStyle="rgba( 0, 0, 0, 1 )",a.lineWidth=8,a.stroke(),a.closePath(),a.fillStyle="rgba( 255, 255, 255, 1 )",d<c.length&&a.fillText("r."+d,f.width+(b.line*(d+1)+45),f.height+5)})},g.create=function(b,e){var f,h=a.Ring.config;return e.index==null&&(e.index=c.length),e.ticks==null&&(e.ticks=0),e.diameter=h.diameter.next||h.diameter.initial,h.diameter.next=(h.diameter.next||h.diameter.initial)+h.diameter.padding*2,e.radius=e.diameter/2,!(e.index>0),e.line=h.line.initial,e.circ=e.diameter*Math.PI,e.step=Math.PI*2/e.ticks,d[b]||(d[b]=document.getElementById(b).getContext("2d")),e.ctx=d[b],c.push(new g(e)),c[c.length-1]},g.create.all=function(a){b.ring.cache.length&&(b.ring.cache.forEach(function(b){g.create(a,{ticks:b.features})}),g.trace())},g.get=function(a){return a!=null&&c[a]},g.config={diameter:{padding:25,initial:150,next:0},line:{initial:25}},typeof global!="undefined"&&(g.config.contexts={},d=g.config.contexts),a.Ring=g,a.Hat&&(a.Hat.Ring=a.Ring)}(typeof exports=="object"&&exports||this,this.Hat||{});
View
3  dist/ringmark.js
@@ -2352,6 +2352,9 @@ QUnit.diff = (function() {
};
// `params` initialized at top of program file
+ // Force all rings to run, all the time.
+ params.push({ key: "all", value: true });
+
if ( params ) {
params.forEach(function( obj ) {
runnerConfig[ obj.key ] = obj.value;
View
2  dist/ringmark.min.js
@@ -1,3 +1,3 @@
/*! Ringmark - v1.4.0 - 2/23/2013
* Copyright ( c ) 2013 Facebook Licensed W3C 3-clause BSD License, W3C Test Suite License */
-(function(a){if(!Array.prototype.forEach||!Array.isArray)a.location.href="/about/index.html"})(this),window.log=function a(){log.history=log.history||[],log.history.push(arguments);if(this.console){var a=arguments,b;a.callee=a.callee.caller,b=[].slice.call(a),typeof console.log=="object"?log.apply.call(console.log,console,b):console.log.apply(console,b)}},function(a){function b(){}for(var c="assert,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profileEnd,time,timeEnd,trace,warn".split(","),d;!!(d=c.pop());)a[d]=a[d]||b}(function(){try{return console.log(),window.console}catch(a){return window.console={}}}()),function(a){function j(){i.autorun=!0,i.currentFeature&&x("featureDone",h,{title:i.currentTitle,name:i.currentFeature,ring:i.currentRing,failed:i.featureStats.bad,passed:i.featureStats.all-i.featureStats.bad,total:i.featureStats.all,assertions:f[i.currentFeature]}),i.currentModule&&x("moduleDone",h,{name:i.currentModule,ring:i.ring,failed:i.moduleStats.bad,passed:i.moduleStats.all-i.moduleStats.bad,total:i.moduleStats.all});var a=v("qunit-banner"),b=v("qunit-tests"),c=+(new Date)-i.started,d=i.stats.all-i.stats.bad,e=["Tests completed in ",c," milliseconds.<br/>",'<span class="passed">',d,'</span> tests of <span class="total">',i.stats.all,'</span> passed, <span class="failed">',i.stats.bad,"</span> failed."].join("");a&&(a.className=i.stats.bad?"qunit-fail":"qunit-pass"),b&&(v("qunit-testresult").innerHTML=e),x("done",h,{failed:i.stats.bad,passed:d,total:i.stats.all,runtime:c})}function k(a){var b=i.filter,c=!1;if(!b)return!0;var d=b.charAt(0)==="!";return d&&(b=b.slice(1)),a.indexOf(b)!==-1?!d:(d&&(c=!0),c)}function l(){try{throw new Error}catch(a){if(a.stacktrace)return a.stacktrace.split("\n")[6];if(a.stack)return a.stack.split("\n")[4];!a.sourceURL}}function m(a){return a?(a=a+"",a.replace(/[\&<>]/g,function(a){switch(a){case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;";default:return a}})):""}function n(a,b){i.queue.push(a),i.autorun&&!i.blocking&&o(b)}function o(c){var d=(new Date).getTime();i.depth=i.depth?i.depth+1:1;while(i.queue.length&&!i.blocking)if(!b.setTimeout||i.updateRate<=0||(new Date).getTime()-d<i.updateRate)i.queue.shift()();else{a.setTimeout(function(){o(c)},13);break}i.depth--,c&&!i.blocking&&!i.queue.length&&i.depth===0&&j()}function p(){i.pollution=[];if(i.noglobals)for(var b in a){if(!e.call(a,b))continue;i.pollution.push(b)}}function q(a){var b=i.pollution;p();var c=r(i.pollution,b);c.length>0&&ok(!1,"Introduced global variable(s): "+c.join(", "));var d=r(b,i.pollution);d.length>0&&ok(!1,"Deleted global variable(s): "+d.join(", "))}function r(a,b){var c=a.slice();for(var d=0;d<c.length;d++)for(var e=0;e<b.length;e++)if(c[d]===b[e]){c.splice(d,1),d--;break}return c}function s(b,c,d){typeof console!="undefined"&&console.error&&console.warn?(console.error(b),console.error(c),console.error(c.stack),console.warn(d.toString())):a.opera&&opera.postError&&opera.postError(b,c,d.toString)}function t(b,c){for(var d in c)if(c[d]===undefined)delete b[d];else if(d!=="constructor"||b!==a)b[d]=c[d];return b}function u(a,b,c){a.addEventListener?a.addEventListener(b,c,!1):a.attachEvent?a.attachEvent("on"+b,c):c()}function v(a){return typeof document!="undefined"&&!!document&&!!document.getElementById&&document.getElementById(a)}function w(a){return function(b){i[a].push(b)}}function x(a,b,c){var d;if(h.hasOwnProperty(a))h[a].call(b,c);else{d=i[a];for(var e=0;e<d.length;e++)d[e].call(b,c)}}function y(a){var b="",c;for(var d=0;a[d];d++)c=a[d],c.nodeType===3||c.nodeType===4?b+=c.nodeValue:c.nodeType!==8&&(b+=y(c.childNodes));return b}function z(a,b){if(b.indexOf)return b.indexOf(a);for(var c=0,d=b.length;c<d;c++)if(b[c]===a)return c;return-1}var b={setTimeout:typeof a.setTimeout!="undefined",sessionStorage:function(){try{return!!sessionStorage.getItem}catch(a){return!1}}()},c=0,d=Object.prototype.toString,e=Object.prototype.hasOwnProperty,f={},g=function(a,b,c,d,e,f){this.name=a,this.testName=b,this.expected=c,this.feature="",this.title="",this.ring=0,this.testEnvironmentArg=d,this.async=e,this.callback=f,this.assertions=[]};g.prototype={init:function(){var a=v("qunit-tests");if(a){var b=document.createElement("strong");b.innerHTML="Running "+this.name;var d=document.createElement("li");d.appendChild(b),d.className="running",d.id=this.id="test-output"+c++,a.appendChild(d)}},setup:function(){this.module!=i.previousModule&&(i.previousModule&&x("moduleDone",h,{name:i.previousModule,failed:i.moduleStats.bad,passed:i.moduleStats.all-i.moduleStats.bad,total:i.moduleStats.all}),i.previousModule=this.module,i.moduleStats={all:0,bad:0},x("moduleStart",h,{name:this.module,ring:this.ring})),this.feature!=i.previousFeature&&(i.previousFeature&&x("featureDone",h,{title:i.previousTitle,ring:i.ring,name:i.previousFeature,failed:i.featureStats.bad,passed:i.featureStats.all-i.featureStats.bad,total:i.featureStats.all,assertions:f[i.previousFeature]}),i.previousRing=this.ring,i.previousFeature=this.feature,i.previousTitle=this.title,i.featureStats={all:0,bad:0},x("featureStart",h,{title:this.title,name:this.feature,ring:this.ring})),i.current=this,this.testEnvironment=t({setup:function(){},teardown:function(){}},this.moduleTestEnvironment),this.testEnvironmentArg&&t(this.testEnvironment,this.testEnvironmentArg),x("testStart",h,{name:this.testName,module:this.module,feature:this.feature,title:this.title,ring:this.ring}),h.current_testEnvironment=this.testEnvironment;try{i.pollution||p(),this.testEnvironment.setup.call(this.testEnvironment)}catch(a){h.ok(!1,"Setup failed on "+this.testName+": "+a.message)}},run:function(){i.current=this,this.async&&h.stop(),h.reset();if(i.notrycatch){this.callback.call(this.testEnvironment);return}try{this.callback.call(this.testEnvironment)}catch(a){s("Test "+this.testName+" died, exception and test follows",a,this.callback),h.ok(!1,"Died on test #"+(this.assertions.length+1)+": "+a.message+" - "+h.jsDump.parse(a)),p(),i.blocking&&h.start()}},teardown:function(){i.current=this;try{this.testEnvironment.teardown.call(this.testEnvironment),q()}catch(a){h.ok(!1,"Teardown failed on "+this.testName+": "+a.message)}},finish:function(){try{h.reset()}catch(c){s("reset() failed, following Test "+this.testName+", exception and reset fn follows",c,h.reset)}i.current=this,this.expected!=null&&this.expected!=this.assertions.length&&h.ok(!1,"Expected "+this.expected+" assertions, but "+this.assertions.length+" were run");var d=0,e=0,g=v("qunit-tests");i.stats.all+=this.assertions.length,i.moduleStats.all+=this.assertions.length,i.featureStats.all+=this.assertions.length;if(g){var j=document.createElement("ol");for(var k=0;k<this.assertions.length;k++){var l=this.assertions[k],m=document.createElement("li");m.className=l.result?"pass":"fail",m.innerHTML=l.message||(l.result?"okay":"failed"),j.appendChild(m),l.result?d++:(e++,i.stats.bad++,i.moduleStats.bad++,i.featureStats.bad++)}h.config.reorder&&b.sessionStorage&&(e?sessionStorage.setItem("qunit-"+this.module+"-"+this.testName,e):sessionStorage.removeItem("qunit-"+this.module+"-"+this.testName)),e==0&&(j.style.display="none");var n=document.createElement("strong");n.innerHTML=this.name+" <b class='counts'>(<b class='failed'>"+e+"</b>, <b class='passed'>"+d+"</b>, "+this.assertions.length+")</b>";var o=document.createElement("a");o.innerHTML="Rerun",o.href=h.url({filter:y([n]).replace(/\([^)]+\)$/,"").replace(/(^\s*|\s*$)/g,"")}),u(n,"click",function(){var a=n.nextSibling.nextSibling,b=a.style.display;a.style.display=b==="none"?"block":"none"}),u(n,"dblclick",function(b){var c=b&&b.target?b.target:a.event.srcElement;if(c.nodeName.toLowerCase()=="span"||c.nodeName.toLowerCase()=="b")c=c.parentNode;a.location&&c.nodeName.toLowerCase()==="strong"&&(a.location=h.url({filter:y([c]).replace(/\([^)]+\)$/,"").replace(/(^\s*|\s*$)/g,"")}))});var m=v(this.id);m.className=e?"fail":"pass",m.removeChild(m.firstChild),m.appendChild(n),m.appendChild(o),m.appendChild(j)}else for(var k=0;k<this.assertions.length;k++)this.assertions[k].result||(e++,i.stats.bad++,i.moduleStats.bad++,i.featureStats.bad++);f[this.feature]||(f[this.feature]=[]),f[this.feature]=f[this.feature].concat(this.assertions),x("testDone",h,{name:this.testName,module:this.module,feature:this.feature,title:this.title,ring:this.ring,failed:e,passed:this.assertions.length-e,total:this.assertions.length})},queue:function(){function c(){n(function(){a.setup()}),n(function(){a.run()}),n(function(){a.teardown()}),n(function(){a.finish()})}var a=this;n(function(){a.init()});var d=h.config.reorder&&b.sessionStorage&&+sessionStorage.getItem("qunit-"+this.module+"-"+this.testName);d?c():n(c,!0)}};var h={Assertions:f,module:function(a,b){i.currentModule=a,i.currentModuleTestEnviroment=b},feature:function(a,b,c){i.currentFeature=a,i.currentRing=b,i.currentTitle=c,i.ring=b},asyncTest:function(a,b,c){arguments.length===2&&(c=b,b=null),h.test(a,b,c,!0)},test:function(a,b,c,d){var e='<span class="test-name">'+m(a)+"</span>",f;arguments.length===2&&(c=b,b=null),b&&typeof b=="object"&&(f=b,b=null),i.currentModule&&(e='<span class="module-name">'+i.currentModule+"</span>: "+e);if(!k(i.currentModule+": "+a))return;var h=new g(e,a,b,f,d,c);h.ring=i.currentRing,h.feature=i.currentFeature,h.title=i.currentTitle,h.module=i.currentModule,h.moduleTestEnvironment=i.currentModuleTestEnviroment,h.queue()},expect:function(a){i.current.expected=a},ok:function(a,b){a=!!a;var c={result:a,message:b};b=m(b),x("log",h,c),i.current.assertions.push({result:a,message:b})},equal:function(a,b,c){h.push(b==a,a,b,c)},notEqual:function(a,b,c){h.push(b!=a,a,b,c)},deepEqual:function(a,b,c){h.push(h.equiv(a,b),a,b,c)},notDeepEqual:function(a,b,c){h.push(!h.equiv(a,b),a,b,c)},strictEqual:function(a,b,c){h.push(b===a,a,b,c)},notStrictEqual:function(a,b,c){h.push(b!==a,a,b,c)},raises:function(a,b,c){var d,e=!1;typeof b=="string"&&(c=b,b=null);try{a()}catch(f){d=f}d&&(b?h.objectType(b)==="regexp"?e=b.test(d):d instanceof b?e=!0:b.call({},d)===!0&&(e=!0):e=!0),h.ok(e,c)},start:function(c){i.semaphore-=c||1;if(i.semaphore>0)return;i.semaphore<0&&(i.semaphore=0),b.setTimeout?a.setTimeout(function(){if(i.semaphore>0)return;i.timeout&&clearTimeout(i.timeout),i.blocking=!1,o(!0)},13):(i.blocking=!1,o(!0))},stop:function(c){i.semaphore+=c||1,i.blocking=!0,i.testTimeout&&b.setTimeout&&(clearTimeout(i.timeout),i.timeout=a.setTimeout(function(){h.ok(!1,"Test timed out"),i.semaphore=1,h.start()},i.testTimeout))}};(function(){function a(){}a.prototype=h,h=new a,h.constructor=a})(),h.equals=h.equal,h.same=h.deepEqual;var i={queue:[],blocking:!0,hidepassed:!1,reorder:!0,altertitle:!0,fixtureId:"qunit-fixture",urlConfig:["noglobals","notrycatch"],begin:[],done:[],log:[],testStart:[],testDone:[],featureStart:[],featureDone:[],moduleStart:[],moduleDone:[]};(function(){var b=a.location||{search:"",protocol:"file:"},c=b.search.slice(1).split("&"),d=c.length,e={},f;if(c[0])for(var g=0;g<d;g++)f=c[g].split("="),f[0]=decodeURIComponent(f[0]),f[1]=f[1]?decodeURIComponent(f[1]):!0,e[f[0]]=f[1];h.urlParams=e,i.filter=e.filter,h.isLocal=b.protocol==="file:"})(),typeof exports=="undefined"||typeof require=="undefined"?(t(a,h),a.QUnit=h):(t(exports,h),exports.QUnit=h),t(h,{config:i,init:function(){t(i,{stats:{all:0,bad:0},moduleStats:{all:0,bad:0},featureStats:{all:0,bad:0},started:+(new Date),updateRate:1e3,blocking:!1,autostart:!0,autorun:!1,filter:"",queue:[],semaphore:0});var a=v("qunit-tests"),b=v("qunit-banner"),c=v("qunit-testresult");a&&(a.innerHTML=""),b&&(b.className=""),c&&c.parentNode.removeChild(c),a&&(c=document.createElement("p"),c.id="qunit-testresult",c.className="result",a.parentNode.insertBefore(c,a),c.innerHTML="Running...<br/>&nbsp;")},reset:function(){var a=v(i.fixtureId),b;a&&(typeof App!="undefined"?b=App.Cache.get("fixtures").by("name",i.current.feature).source:typeof Visual!="undefined"?b=Visual.fixture:b=i.fixture,a.innerHTML=b)},triggerEvent:function(a,b,c){document.createEvent?(c=document.createEvent("MouseEvents"),c.initMouseEvent(b,!0,!0,a.ownerDocument.defaultView,0,0,0,0,0,!1,!1,!1,!1,0,null),a.dispatchEvent(c)):a.fireEvent&&a.fireEvent("on"+b)},is:function(a,b){return h.objectType(b)==a},objectType:function(a){if(typeof a=="undefined")return"undefined";if(a===null)return"null";var b=d.call(a).match(/^\[object\s(.*)\]$/)[1]||"";switch(b){case"Number":return isNaN(a)?"nan":"number";case"String":case"Boolean":case"Array":case"Date":case"RegExp":case"Function":return b.toLowerCase()}return typeof a=="object"?"object":undefined},push:function(a,b,c,d){var e={result:a,message:d,actual:b,expected:c};d=m(d)||(a?"okay":"failed"),d='<span class="test-message">'+d+"</span>",c=m(h.jsDump.parse(c)),b=m(h.jsDump.parse(b));var f=d+'<table><tr class="test-expected"><th>Expected: </th><td><pre>'+c+"</pre></td></tr>";b!=c&&(f+='<tr class="test-actual"><th>Result: </th><td><pre>'+b+"</pre></td></tr>",f+='<tr class="test-diff"><th>Diff: </th><td><pre>'+h.diff(c,b)+"</pre></td></tr>");if(!a){var g=l();g&&(e.source=g,f+='<tr class="test-source"><th>Source: </th><td><pre>'+m(g)+"</pre></td></tr>")}f+="</table>",x("log",h,e),i.current.assertions.push({result:!!a,message:f})},url:function(b){b=t(t({},h.urlParams),b);var c="?",d;for(d in b){if(!e.call(b,d))continue;c+=encodeURIComponent(d)+"="+encodeURIComponent(b[d])+"&"}return a.location.pathname+c.slice(0,-1)},extend:t,id:v,addEvent:u}),t(h.constructor.prototype,{begin:w("begin"),done:w("done"),log:w("log"),testStart:w("testStart"),testDone:w("testDone"),featureStart:w("featureStart"),featureDone:w("featureDone"),moduleStart:w("moduleStart"),moduleDone:w("moduleDone")});if(typeof document=="undefined"||document.readyState==="complete")i.autorun=!0;h.load=function(){x("begin",h,{});var c=t({},i);h.init(),t(i,c),i.blocking=!1;var d="",e=i.urlConfig.length;for(var f=0,g;f<e,g=i.urlConfig[f];f++)i[g]=h.urlParams[g],d+='<label><input name="'+g+'" type="checkbox"'+(i[g]?' checked="checked"':"")+">"+g+"</label>";var j=v("qunit-userAgent");j&&(j.innerHTML=navigator.userAgent);var k=v("qunit-header");k&&(k.innerHTML='<a href="'+h.url({filter:undefined})+'"> '+k.innerHTML+"</a> "+d,u(k,"change",function(b){var c={};c[b.target.name]=b.target.checked?!0:undefined,a.location=h.url(c)}));var l=v("qunit-testrunner-toolbar");if(l){var m=document.createElement("input");m.type="checkbox",m.id="qunit-filter-pass",u(m,"click",function(){var a=document.getElementById("qunit-tests");if(m.checked)a.className=a.className+" hidepass";else{var c=" "+a.className.replace(/[\n\t\r]/g," ")+" ";a.className=c.replace(/ hidepass /," ")}b.sessionStorage&&(m.checked?sessionStorage.setItem("qunit-filter-passed-tests","true"):sessionStorage.removeItem("qunit-filter-passed-tests"))});if(i.hidepassed||b.sessionStorage&&sessionStorage.getItem("qunit-filter-passed-tests")){m.checked=!0;var n=document.getElementById("qunit-tests");n.className=n.className+" hidepass"}l.appendChild(m);var o=document.createElement("label");o.setAttribute("for","qunit-filter-pass"),o.innerHTML="Hide passed tests",l.appendChild(o)}var p=v(i.fixtureId);p&&(i.fixture=p.innerHTML),i.autostart&&h.start()},u(a,"load",h.load),a.onerror=function(a,b,c){h.config.current?ok(!1,a+", "+b+":"+c):test("global failure",function(){ok(!1,a+", "+b+":"+c)})},h.equiv=function(){function d(a,b,c){var d=h.objectType(a);if(d)return h.objectType(b[d])==="function"?b[d].apply(b,c):b[d]}var a,b=[],c=[],e=Object.getPrototypeOf||function(a){return a.__proto__},f=function(){function d(a,b){return a instanceof b.constructor||b instanceof a.constructor?b==a:b===a}return{string:d,"boolean":d,number:d,"null":d,"undefined":d,nan:function(a){return isNaN(a)},date:function(a,b){return h.objectType(a)==="date"&&b.valueOf()===a.valueOf()},regexp:function(a,b){return h.objectType(a)==="regexp"&&b.source===a.source&&b.global===a.global&&b.ignoreCase===a.ignoreCase&&b.multiline===a.multiline},"function":function(){var a=b[b.length-1];return a!==Object&&typeof a!="undefined"},array:function(b,d){var e,f,g,i;if(h.objectType(b)!=="array")return!1;i=d.length;if(i!==b.length)return!1;c.push(d);for(e=0;e<i;e++){g=!1;for(f=0;f<c.length;f++)c[f]===d[e]&&(g=!0);if(!g&&!a(d[e],b[e]))return c.pop(),!1}return c.pop(),!0},object:function(d,f){var g,h,i,j=!0,k=[],l=[];if(f.constructor===d.constructor||e(f)===null&&e(d)===Object.prototype||e(d)===null&&e(f)===Object.prototype){b.push(f.constructor),c.push(f);for(g in f){i=!1;for(h=0;h<c.length;h++)c[h]===f[g]&&(i=!0);k.push(g);if(!i&&!a(f[g],d[g])){j=!1;break}}b.pop(),c.pop();for(g in d)l.push(g);return j&&a(k.sort(),l.sort())}return!1}}}();return a=function(){var a=Array.prototype.slice.apply(arguments);return a.length<2?!0:function(a,b){return a===b?!0:a===null||b===null||typeof a=="undefined"||typeof b=="undefined"||h.objectType(a)!==h.objectType(b)?!1:d(a,f,[b,a])}(a[0],a[1])&&arguments.callee.apply(this,a.splice(1,a.length-1))},a}(),h.jsDump=function(){function a(a){return'"'+a.toString().replace(/"/g,'\\"')+'"'}function b(a){return a+""}function c(a,b,c){var d=g.separator(),e=g.indent(),f=g.indent(1);return b.join&&(b=b.join(","+d+f)),b?[a,f+b,e+c].join(d):a+c}function e(a,b){var d=a.length,e=Array(d);this.up();while(d--)e[d]=this.parse(a[d],undefined,b);return this.down(),c("[",e,"]")}var f=/^function (\w+)/,g={parse:function(a,b,c){c=c||[];var d=this.parsers[b||this.typeOf(a)];b=typeof d;var e=z(a,c);if(e!=-1)return"recursion("+(e-c.length)+")";if(b=="function"){c.push(a);var f=d.call(this,a,c);return c.pop(),f}return b=="string"?d:this.parsers.error},typeOf:function(a){var b;return a===null?b="null":typeof a=="undefined"?b="undefined":h.is("RegExp",a)?b="regexp":h.is("Date",a)?b="date":h.is("Function",a)?b="function":typeof a.setInterval!==undefined&&typeof a.document!="undefined"&&typeof a.nodeType=="undefined"?b="window":a.nodeType===9?b="document":a.nodeType?b="node":d.call(a)==="[object Array]"||typeof a.length=="number"&&typeof a.item!="undefined"&&(a.length?a.item(0)===a[0]:a.item(0)===null&&typeof a[0]=="undefined")?b="array":b=typeof a,b},separator:function(){return this.multiline?this.HTML?"<br />":"\n":this.HTML?"&nbsp;":" "},indent:function(a){if(!this.multiline)return"";var b=this.indentChar;return this.HTML&&(b=b.replace(/\t/g," ").replace(/ /g,"&nbsp;")),Array(this._depth_+(a||0)).join(b)},up:function(a){this._depth_+=a||1},down:function(a){this._depth_-=a||1},setParser:function(a,b){this.parsers[a]=b},quote:a,literal:b,join:c,_depth_:1,parsers:{window:"[Window]",document:"[Document]",error:"[ERROR]",unknown:"[Unknown]","null":"null","undefined":"undefined","function":function(a){var b="function",d="name"in a?a.name:(f.exec(a)||[])[1];return d&&(b+=" "+d),b+="(",b=[b,h.jsDump.parse(a,"functionArgs"),"){"].join(""),c(b,h.jsDump.parse(a,"functionCode"),"}")},array:e,nodelist:e,arguments:e,object:function(a,b){var d=[];h.jsDump.up();for(var e in a){var f=a[e];d.push(h.jsDump.parse(e,"key")+": "+h.jsDump.parse(f,undefined,b))}return h.jsDump.down(),c("{",d,"}")},node:function(a){var b=h.jsDump.HTML?"&lt;":"<",c=h.jsDump.HTML?"&gt;":">",d=a.nodeName.toLowerCase(),e=b+d;for(var f in h.jsDump.DOMAttrs){var g=a[h.jsDump.DOMAttrs[f]];g&&(e+=" "+f+"="+h.jsDump.parse(g,"attribute"))}return e+c+b+"/"+d+c},functionArgs:function(a){var b=a.length;if(!b)return"";var c=Array(b);while(b--)c[b]=String.fromCharCode(97+b);return" "+c.join(", ")+" "},key:a,functionCode:"[code]",attribute:a,string:a,date:a,regexp:b,number:b,"boolean":b},DOMAttrs:{id:"id",name:"name","class":"className"},HTML:!1,indentChar:" ",multiline:!0};return g}(),h.diff=function(){function a(a,b){var c={},d={};for(var f=0;f<b.length;f++)c[b[f]]==null&&(c[b[f]]={rows:[],o:null}),c[b[f]].rows.push(f);for(var f=0;f<a.length;f++)d[a[f]]==null&&(d[a[f]]={rows:[],n:null}),d[a[f]].rows.push(f);for(var f in c){if(!e.call(c,f))continue;c[f].rows.length==1&&typeof d[f]!="undefined"&&d[f].rows.length==1&&(b[c[f].rows[0]]={text:b[c[f].rows[0]],row:d[f].rows[0]},a[d[f].rows[0]]={text:a[d[f].rows[0]],row:c[f].rows[0]})}for(var f=0;f<b.length-1;f++)b[f].text!=null&&b[f+1].text==null&&b[f].row+1<a.length&&a[b[f].row+1].text==null&&b[f+1]==a[b[f].row+1]&&(b[f+1]={text:b[f+1],row:b[f].row+1},a[b[f].row+1]={text:a[b[f].row+1],row:f+1});for(var f=b.length-1;f>0;f--)b[f].text!=null&&b[f-1].text==null&&b[f].row>0&&a[b[f].row-1].text==null&&b[f-1]==a[b[f].row-1]&&(b[f-1]={text:b[f-1],row:b[f].row-1},a[b[f].row-1]={text:a[b[f].row-1],row:f-1});return{o:a,n:b}}return function(b,c){b=b.replace(/\s+$/,""),c=c.replace(/\s+$/,"");var d=a(b==""?[]:b.split(/\s+/),c==""?[]:c.split(/\s+/)),e="",f=b.match(/\s+/g);f==null?f=[" "]:f.push(" ");var g=c.match(/\s+/g);g==null?g=[" "]:g.push(" ");if(d.n.length==0)for(var h=0;h<d.o.length;h++)e+="<del>"+d.o[h]+f[h]+"</del>";else{if(d.n[0].text==null)for(c=0;c<d.o.length&&d.o[c].text==null;c++)e+="<del>"+d.o[c]+f[c]+"</del>";for(var h=0;h<d.n.length;h++)if(d.n[h].text==null)e+="<ins>"+d.n[h]+g[h]+"</ins>";else{var i="";for(c=d.n[h].row+1;c<d.o.length&&d.o[c].text==null;c++)i+="<del>"+d.o[c]+f[c]+"</del>";e+=" "+d.n[h].text+g[h]+i}}return e}}()}(this),function(a){var b,c;a.QUnit||(b=a.test,c=a.async_test,a.assertEqual=a.equal=a.assert_equals,a.deepEqual=a.assert_object_equals,a.assert=a.ok=function(b,c){a.assert_true(!!b,c)},a.module=function(b,c){a.setup(c.setup)},a.test=function(a,c){b(c,a)},a.asyncTest=function(a,b){var d,e=c(a,{timeout:5e3});return b&&e.step(function(){b(e)}),e}),a.QUnit&&(c=a.QUnit.asyncTest,a.assert=a.test.assert=a.ok,a.asyncTest=function(a,b,d){typeof b=="function"&&(d=b);var e={done:function(){start()},step:function(a){setTimeout(a,0)}};c(a,function(){d(e)})},a.QUnit.config.autostart=!1)}(this),function(a){var b=[].slice,c={}.toString,d={}.hasOwnProperty,e={},f=["Object","Number","String","Boolean","Function","RegExp","Array","Date","Error"],g=function(a){var b=a.location&&a.location.search||"";return b.replace(/^\?/,"").split("&").map(function(a){var b=a.split("=");return{key:b[0],value:b[1]||!0}})}(a),h=[],i=[],j={nop:function(){},uniqueId:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(a){var b=Math.random()*16|0;return(a==="x"?b:b&3|8).toString(16)}).toUpperCase()},isKindOf:function(a,b){return a!=null&&c.call(a)==="[object "+b+"]"},kindOf:function(a){return a!=null&&/^\[object (.*)\]$/.exec(c.call(a))[1]},clone:function(a){var b,c,d,e=[];if(Array.isArray(a)){for(d=0,c=a.length;d<c;d++)b=a[d],typeof b=="object"&&(b=j.clone(b)),e[d]=b;return e}return Object.create({},function(a){var b={};return Object.getOwnPropertyNames(a).forEach(function(c){var d=Object.getOwnPropertyDescriptor(a,c);typeof a[c]=="object"&&(d.value=j.clone(a[c])),b[c]=d}),b}(a))},extend:function(a){var c,d,e=b.call(arguments,1),f=e.length,g=0;for(;g<f;g++){c=j.clone(e[g]);for(d in c)a[d]=c[d]}return a}},k=" -webkit- -moz- -o- -ms- ".split(" "),l="Webkit Moz O ms",m=l.split(" "),n=l.toLowerCase().split(" ");m.push("WebKit","Moz","MS","O"),n.push("WebKit","Moz","MS","O"),f.forEach(function(a){e["[object "+a+"]"]=a,j["is"+a]=function(b){return j.kindOf(b)===a}}),j.isHTML=function(a){return a=a.trim(),a.charAt(0)==="<"&&a.charAt(a.length-1)===">"&&a.length>=3},j.prefixes={css:k,dom:n,cssom:m,expandCss:function(a,b){return k.join(a+";")+(b||"")}},j.get={string:function(a,b){return!!~(""+a).indexOf(b)},cssProp:function(a,b,c){var d,e,f,g;c=c||!1;if(!c)return b in a.style;d=b.charAt(0).toUpperCase()+b.substr(1),e=(b+" "+m.join(d+" ")+d).split(" "),f=0,g=e.length;for(f=0;f<g;f++)if(e[f]in a.style)return!0;return!1},domProp:function(a,b,c){var d,e,f,g;c=c||!1;if(!c)return a[b]!==undefined?a[b]:!1;d=b.charAt(0).toUpperCase()+b.substr(1),e=(b+" "+n.join(d+" ")+d).split(" "),f=0,g=e.length;for(f=0;f<g;f++)if(e[f]in a)return a[e[f]];return!1}},j.inject=function(a,b){var c,d,e;return typeof b=="string"&&(j.isHTML(b)?(d=/^<(\w+)\s*\/?>(?:<\/\1>)?$/.exec(b),d&&d.length&&d[1]&&(b=document.createElement(d[1]))):b=document.querySelector(b)),typeof a=="string"?(j.isHTML(a)&&!/^<style/.test(a)?c="innerHTML":(c="innerText"in b?"innerText":"textContent",/^<style/.test(a)&&(c="textContent")),b[c]+=a):a.nodeType===1&&b.appendChild(a),b},j.hostAPI=function(a,b){return j.get.domProp(window,a,b)||!1},j.API=function(a,b,c,d){var e;return arguments.length===1&&("expect"in a&&(d=a.expect),"withPrefixes"in a&&(c=a.withPrefixes),b=a.api,a=a.host),!a||a==null?undefined:(e=j.get.domProp(a,b,c),arguments.length!==1&&arguments.length!==4||e!==d?e||undefined:e)},j.simulate=function(a,b,c){var d;a==="click"?(d=document.createEvent("MouseEvents"),d.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null)):(d=document.createEvent("HTMLEvents"),d.initEvent(a,!0,!1)),d.synthetic=!0,c&&j.extend(d,c),b.dispatchEvent(d)},j.on=function(a,b){(i[a]||(i[a]=[])).push(b)},j.once=function(a,b){function c(){b.apply(this,arguments),j.off(a,b)}j.on(a,c)},j.off=function(a,b){var c=i[a];c&&(b?c.splice(c.indexOf(b),1):i[a]=[])},j.emit=function(a){var b=0,c=[].slice.call(arguments,1),d=i[a]||[],e=d.length;for(;b<e;b++)d[b]&&d[b].apply(this,c)},[["on","addEventListener"],["off","removeEventListener"]].forEach(function(a){var b,c,d;b=a[0],c=a[1],d=j[b],j[b]=function(){var a,b,e,f;if(typeof arguments[0]=="string")return d.apply(j,[].slice.call(arguments));a=arguments[0],b=arguments[1],e=arguments[2],f=arguments[3]||!1,a[c]&&a[c].call(a,b,e,f)}}),j.results={};var o=0,p={all:!1};j.ring=function(a){j.ring.cache.push(a)},j.ring.cache=[],j.ring.getCount=function(a){var b=j.ring.cache[a];return b&&b.features||0},j.ring.totals=function(){return a.QUnit.config.stats},j.next=function(){var b=j.ring.cache[o];b&&b.test(),setTimeout(function(){a.QUnit.start()},1e3)},j.start=function(){j.next(),j.emit("runner:start")},j.on("runner:done",function(){if(a.Rng&&a.Rng.isFake)return;a.QUnit.config.autorun=!1,a.QUnit.config.blocking=!1,a.QUnit.config.semaphore=0,a.QUnit.load()}),j.on("runner:ringDone",function(b){console.log("exports.Rng!!!!!!!",a.Rng);if(a.Rng&&a.Rng.isFake)return;a.QUnit&&(["previousFeature","previousModule","previousRing","currentFeature","currentModule"].forEach(function(b){a.QUnit.config[b]=""}),a.QUnit.config.autorun=!1,a.QUnit.config.blocking=!1,a.QUnit.config.semaphore=0,a.QUnit.stop(),console.log("Stopped ("+o+")"),console.log("Waiting...")),o++,(p.all||b.failed===0)&&j.next()}),j.Runner=function(){},j.Runner.config=function(b,c){QUnit.config[b]&&(a.QUnit.config[b]=c),p[b]=c},g&&g.forEach(function(a){p[a.key]=a.value}),j.prefixes.expand=j.prefixes.expandCss,j.test=j.check=j.get,a.TopHat=a.Hat=a.H=j}(typeof exports=="object"&&exports||this),function(a,b){function g(a){var b;for(b in a)this[b]=a[b];this.history=[Math.PI*1.5]}var c=[],d={},e={running:"255, 255, 255",clear:"255, 255, 255",pass:"0, 199, 59",fail:"182, 184, 186"},f={nomore:"No more ticks available for this ring"};g.prototype.draw=function(a,b,c,d){var e="rgba("+c+", "+d+")";this.ctx.beginPath(),this.ctx.arc(this.ctx.canvas.width/2,this.ctx.canvas.height/2,this.radius,a,b,!1),this.ctx.strokeStyle=e,this.ctx.lineWidth=this.line,this.ctx.stroke(),this.ctx.closePath()},g.prototype.tick=function(a,b){if(this.history.length>this.ticks){console.log(f.nomore);return}if(!a||typeof a!="string")b=a,a="tick";var c=this.history[this.history.length-1],d=c+this.step,g=1,h=e.running;b&&(h=e[b.failed?"fail":"pass"]),this.draw(c,d+.009,h,g),a==="tick"&&(this.draw(c,d+.009,h,g),this.history.push(d))},g.trace=function(){var a,b,e=document.createElement("canvas"),f={width:null,height:null},h=function(){var a;for(a in d)return d[a].canvas}();e.style.position="relative",e.style.top="-305px",e.style.left="-5px",e.width=h.width+10,e.height=h.height+10,h.parentNode.insertBefore(e,h.nextSibling),a=e.getContext("2d"),f.width=a.canvas.width/2,f.height=a.canvas.height/2,b=g.get(0).line*c.length+1,a.fillRect(f.width-4,10,8,b),a.fillRect(f.width+65,f.height-10,b,21),a.font="bold 12px Helvetica",c.concat([{line:25}]).forEach(function(b,d){a.beginPath(),a.arc(f.width,f.height-3,b.line*(d+1)+40,Math.PI*2,0,!1),a.strokeStyle="rgba( 0, 0, 0, 1 )",a.lineWidth=8,a.stroke(),a.closePath(),a.fillStyle="rgba( 255, 255, 255, 1 )",d<c.length&&a.fillText("r."+d,f.width+(b.line*(d+1)+45),f.height+5)})},g.create=function(b,e){var f,h=a.Ring.config;return e.index==null&&(e.index=c.length),e.ticks==null&&(e.ticks=0),e.diameter=h.diameter.next||h.diameter.initial,h.diameter.next=(h.diameter.next||h.diameter.initial)+h.diameter.padding*2,e.radius=e.diameter/2,!(e.index>0),e.line=h.line.initial,e.circ=e.diameter*Math.PI,e.step=Math.PI*2/e.ticks,d[b]||(d[b]=document.getElementById(b).getContext("2d")),e.ctx=d[b],c.push(new g(e)),c[c.length-1]},g.create.all=function(a){b.ring.cache.length&&(b.ring.cache.forEach(function(b){g.create(a,{ticks:b.features})}),g.trace())},g.get=function(a){return a!=null&&c[a]},g.config={diameter:{padding:25,initial:150,next:0},line:{initial:25}},typeof global!="undefined"&&(g.config.contexts={},d=g.config.contexts),a.Ring=g,a.Hat&&(a.Hat.Ring=a.Ring)}(typeof exports=="object"&&exports||this,this.Hat||{}),function(a,b){var c=[];["begin","log","done","testStart","testDone","moduleStart","moduleDone","featureStart","featureDone"].filter(function(a){return!~c.indexOf(a)}).forEach(function(a){b[a]=function(b){var c=a;a==="log"&&!!b.result,Hat.emit("runner:"+c.replace("module","ring"),b)}})}(this,this.QUnit);
+(function(a){if(!Array.prototype.forEach||!Array.isArray)a.location.href="/about/index.html"})(this),window.log=function a(){log.history=log.history||[],log.history.push(arguments);if(this.console){var a=arguments,b;a.callee=a.callee.caller,b=[].slice.call(a),typeof console.log=="object"?log.apply.call(console.log,console,b):console.log.apply(console,b)}},function(a){function b(){}for(var c="assert,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profileEnd,time,timeEnd,trace,warn".split(","),d;!!(d=c.pop());)a[d]=a[d]||b}(function(){try{return console.log(),window.console}catch(a){return window.console={}}}()),function(a){function j(){i.autorun=!0,i.currentFeature&&x("featureDone",h,{title:i.currentTitle,name:i.currentFeature,ring:i.currentRing,failed:i.featureStats.bad,passed:i.featureStats.all-i.featureStats.bad,total:i.featureStats.all,assertions:f[i.currentFeature]}),i.currentModule&&x("moduleDone",h,{name:i.currentModule,ring:i.ring,failed:i.moduleStats.bad,passed:i.moduleStats.all-i.moduleStats.bad,total:i.moduleStats.all});var a=v("qunit-banner"),b=v("qunit-tests"),c=+(new Date)-i.started,d=i.stats.all-i.stats.bad,e=["Tests completed in ",c," milliseconds.<br/>",'<span class="passed">',d,'</span> tests of <span class="total">',i.stats.all,'</span> passed, <span class="failed">',i.stats.bad,"</span> failed."].join("");a&&(a.className=i.stats.bad?"qunit-fail":"qunit-pass"),b&&(v("qunit-testresult").innerHTML=e),x("done",h,{failed:i.stats.bad,passed:d,total:i.stats.all,runtime:c})}function k(a){var b=i.filter,c=!1;if(!b)return!0;var d=b.charAt(0)==="!";return d&&(b=b.slice(1)),a.indexOf(b)!==-1?!d:(d&&(c=!0),c)}function l(){try{throw new Error}catch(a){if(a.stacktrace)return a.stacktrace.split("\n")[6];if(a.stack)return a.stack.split("\n")[4];!a.sourceURL}}function m(a){return a?(a=a+"",a.replace(/[\&<>]/g,function(a){switch(a){case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;";default:return a}})):""}function n(a,b){i.queue.push(a),i.autorun&&!i.blocking&&o(b)}function o(c){var d=(new Date).getTime();i.depth=i.depth?i.depth+1:1;while(i.queue.length&&!i.blocking)if(!b.setTimeout||i.updateRate<=0||(new Date).getTime()-d<i.updateRate)i.queue.shift()();else{a.setTimeout(function(){o(c)},13);break}i.depth--,c&&!i.blocking&&!i.queue.length&&i.depth===0&&j()}function p(){i.pollution=[];if(i.noglobals)for(var b in a){if(!e.call(a,b))continue;i.pollution.push(b)}}function q(a){var b=i.pollution;p();var c=r(i.pollution,b);c.length>0&&ok(!1,"Introduced global variable(s): "+c.join(", "));var d=r(b,i.pollution);d.length>0&&ok(!1,"Deleted global variable(s): "+d.join(", "))}function r(a,b){var c=a.slice();for(var d=0;d<c.length;d++)for(var e=0;e<b.length;e++)if(c[d]===b[e]){c.splice(d,1),d--;break}return c}function s(b,c,d){typeof console!="undefined"&&console.error&&console.warn?(console.error(b),console.error(c),console.error(c.stack),console.warn(d.toString())):a.opera&&opera.postError&&opera.postError(b,c,d.toString)}function t(b,c){for(var d in c)if(c[d]===undefined)delete b[d];else if(d!=="constructor"||b!==a)b[d]=c[d];return b}function u(a,b,c){a.addEventListener?a.addEventListener(b,c,!1):a.attachEvent?a.attachEvent("on"+b,c):c()}function v(a){return typeof document!="undefined"&&!!document&&!!document.getElementById&&document.getElementById(a)}function w(a){return function(b){i[a].push(b)}}function x(a,b,c){var d;if(h.hasOwnProperty(a))h[a].call(b,c);else{d=i[a];for(var e=0;e<d.length;e++)d[e].call(b,c)}}function y(a){var b="",c;for(var d=0;a[d];d++)c=a[d],c.nodeType===3||c.nodeType===4?b+=c.nodeValue:c.nodeType!==8&&(b+=y(c.childNodes));return b}function z(a,b){if(b.indexOf)return b.indexOf(a);for(var c=0,d=b.length;c<d;c++)if(b[c]===a)return c;return-1}var b={setTimeout:typeof a.setTimeout!="undefined",sessionStorage:function(){try{return!!sessionStorage.getItem}catch(a){return!1}}()},c=0,d=Object.prototype.toString,e=Object.prototype.hasOwnProperty,f={},g=function(a,b,c,d,e,f){this.name=a,this.testName=b,this.expected=c,this.feature="",this.title="",this.ring=0,this.testEnvironmentArg=d,this.async=e,this.callback=f,this.assertions=[]};g.prototype={init:function(){var a=v("qunit-tests");if(a){var b=document.createElement("strong");b.innerHTML="Running "+this.name;var d=document.createElement("li");d.appendChild(b),d.className="running",d.id=this.id="test-output"+c++,a.appendChild(d)}},setup:function(){this.module!=i.previousModule&&(i.previousModule&&x("moduleDone",h,{name:i.previousModule,failed:i.moduleStats.bad,passed:i.moduleStats.all-i.moduleStats.bad,total:i.moduleStats.all}),i.previousModule=this.module,i.moduleStats={all:0,bad:0},x("moduleStart",h,{name:this.module,ring:this.ring})),this.feature!=i.previousFeature&&(i.previousFeature&&x("featureDone",h,{title:i.previousTitle,ring:i.ring,name:i.previousFeature,failed:i.featureStats.bad,passed:i.featureStats.all-i.featureStats.bad,total:i.featureStats.all,assertions:f[i.previousFeature]}),i.previousRing=this.ring,i.previousFeature=this.feature,i.previousTitle=this.title,i.featureStats={all:0,bad:0},x("featureStart",h,{title:this.title,name:this.feature,ring:this.ring})),i.current=this,this.testEnvironment=t({setup:function(){},teardown:function(){}},this.moduleTestEnvironment),this.testEnvironmentArg&&t(this.testEnvironment,this.testEnvironmentArg),x("testStart",h,{name:this.testName,module:this.module,feature:this.feature,title:this.title,ring:this.ring}),h.current_testEnvironment=this.testEnvironment;try{i.pollution||p(),this.testEnvironment.setup.call(this.testEnvironment)}catch(a){h.ok(!1,"Setup failed on "+this.testName+": "+a.message)}},run:function(){i.current=this,this.async&&h.stop(),h.reset();if(i.notrycatch){this.callback.call(this.testEnvironment);return}try{this.callback.call(this.testEnvironment)}catch(a){s("Test "+this.testName+" died, exception and test follows",a,this.callback),h.ok(!1,"Died on test #"+(this.assertions.length+1)+": "+a.message+" - "+h.jsDump.parse(a)),p(),i.blocking&&h.start()}},teardown:function(){i.current=this;try{this.testEnvironment.teardown.call(this.testEnvironment),q()}catch(a){h.ok(!1,"Teardown failed on "+this.testName+": "+a.message)}},finish:function(){try{h.reset()}catch(c){s("reset() failed, following Test "+this.testName+", exception and reset fn follows",c,h.reset)}i.current=this,this.expected!=null&&this.expected!=this.assertions.length&&h.ok(!1,"Expected "+this.expected+" assertions, but "+this.assertions.length+" were run");var d=0,e=0,g=v("qunit-tests");i.stats.all+=this.assertions.length,i.moduleStats.all+=this.assertions.length,i.featureStats.all+=this.assertions.length;if(g){var j=document.createElement("ol");for(var k=0;k<this.assertions.length;k++){var l=this.assertions[k],m=document.createElement("li");m.className=l.result?"pass":"fail",m.innerHTML=l.message||(l.result?"okay":"failed"),j.appendChild(m),l.result?d++:(e++,i.stats.bad++,i.moduleStats.bad++,i.featureStats.bad++)}h.config.reorder&&b.sessionStorage&&(e?sessionStorage.setItem("qunit-"+this.module+"-"+this.testName,e):sessionStorage.removeItem("qunit-"+this.module+"-"+this.testName)),e==0&&(j.style.display="none");var n=document.createElement("strong");n.innerHTML=this.name+" <b class='counts'>(<b class='failed'>"+e+"</b>, <b class='passed'>"+d+"</b>, "+this.assertions.length+")</b>";var o=document.createElement("a");o.innerHTML="Rerun",o.href=h.url({filter:y([n]).replace(/\([^)]+\)$/,"").replace(/(^\s*|\s*$)/g,"")}),u(n,"click",function(){var a=n.nextSibling.nextSibling,b=a.style.display;a.style.display=b==="none"?"block":"none"}),u(n,"dblclick",function(b){var c=b&&b.target?b.target:a.event.srcElement;if(c.nodeName.toLowerCase()=="span"||c.nodeName.toLowerCase()=="b")c=c.parentNode;a.location&&c.nodeName.toLowerCase()==="strong"&&(a.location=h.url({filter:y([c]).replace(/\([^)]+\)$/,"").replace(/(^\s*|\s*$)/g,"")}))});var m=v(this.id);m.className=e?"fail":"pass",m.removeChild(m.firstChild),m.appendChild(n),m.appendChild(o),m.appendChild(j)}else for(var k=0;k<this.assertions.length;k++)this.assertions[k].result||(e++,i.stats.bad++,i.moduleStats.bad++,i.featureStats.bad++);f[this.feature]||(f[this.feature]=[]),f[this.feature]=f[this.feature].concat(this.assertions),x("testDone",h,{name:this.testName,module:this.module,feature:this.feature,title:this.title,ring:this.ring,failed:e,passed:this.assertions.length-e,total:this.assertions.length})},queue:function(){function c(){n(function(){a.setup()}),n(function(){a.run()}),n(function(){a.teardown()}),n(function(){a.finish()})}var a=this;n(function(){a.init()});var d=h.config.reorder&&b.sessionStorage&&+sessionStorage.getItem("qunit-"+this.module+"-"+this.testName);d?c():n(c,!0)}};var h={Assertions:f,module:function(a,b){i.currentModule=a,i.currentModuleTestEnviroment=b},feature:function(a,b,c){i.currentFeature=a,i.currentRing=b,i.currentTitle=c,i.ring=b},asyncTest:function(a,b,c){arguments.length===2&&(c=b,b=null),h.test(a,b,c,!0)},test:function(a,b,c,d){var e='<span class="test-name">'+m(a)+"</span>",f;arguments.length===2&&(c=b,b=null),b&&typeof b=="object"&&(f=b,b=null),i.currentModule&&(e='<span class="module-name">'+i.currentModule+"</span>: "+e);if(!k(i.currentModule+": "+a))return;var h=new g(e,a,b,f,d,c);h.ring=i.currentRing,h.feature=i.currentFeature,h.title=i.currentTitle,h.module=i.currentModule,h.moduleTestEnvironment=i.currentModuleTestEnviroment,h.queue()},expect:function(a){i.current.expected=a},ok:function(a,b){a=!!a;var c={result:a,message:b};b=m(b),x("log",h,c),i.current.assertions.push({result:a,message:b})},equal:function(a,b,c){h.push(b==a,a,b,c)},notEqual:function(a,b,c){h.push(b!=a,a,b,c)},deepEqual:function(a,b,c){h.push(h.equiv(a,b),a,b,c)},notDeepEqual:function(a,b,c){h.push(!h.equiv(a,b),a,b,c)},strictEqual:function(a,b,c){h.push(b===a,a,b,c)},notStrictEqual:function(a,b,c){h.push(b!==a,a,b,c)},raises:function(a,b,c){var d,e=!1;typeof b=="string"&&(c=b,b=null);try{a()}catch(f){d=f}d&&(b?h.objectType(b)==="regexp"?e=b.test(d):d instanceof b?e=!0:b.call({},d)===!0&&(e=!0):e=!0),h.ok(e,c)},start:function(c){i.semaphore-=c||1;if(i.semaphore>0)return;i.semaphore<0&&(i.semaphore=0),b.setTimeout?a.setTimeout(function(){if(i.semaphore>0)return;i.timeout&&clearTimeout(i.timeout),i.blocking=!1,o(!0)},13):(i.blocking=!1,o(!0))},stop:function(c){i.semaphore+=c||1,i.blocking=!0,i.testTimeout&&b.setTimeout&&(clearTimeout(i.timeout),i.timeout=a.setTimeout(function(){h.ok(!1,"Test timed out"),i.semaphore=1,h.start()},i.testTimeout))}};(function(){function a(){}a.prototype=h,h=new a,h.constructor=a})(),h.equals=h.equal,h.same=h.deepEqual;var i={queue:[],blocking:!0,hidepassed:!1,reorder:!0,altertitle:!0,fixtureId:"qunit-fixture",urlConfig:["noglobals","notrycatch"],begin:[],done:[],log:[],testStart:[],testDone:[],featureStart:[],featureDone:[],moduleStart:[],moduleDone:[]};(function(){var b=a.location||{search:"",protocol:"file:"},c=b.search.slice(1).split("&"),d=c.length,e={},f;if(c[0])for(var g=0;g<d;g++)f=c[g].split("="),f[0]=decodeURIComponent(f[0]),f[1]=f[1]?decodeURIComponent(f[1]):!0,e[f[0]]=f[1];h.urlParams=e,i.filter=e.filter,h.isLocal=b.protocol==="file:"})(),typeof exports=="undefined"||typeof require=="undefined"?(t(a,h),a.QUnit=h):(t(exports,h),exports.QUnit=h),t(h,{config:i,init:function(){t(i,{stats:{all:0,bad:0},moduleStats:{all:0,bad:0},featureStats:{all:0,bad:0},started:+(new Date),updateRate:1e3,blocking:!1,autostart:!0,autorun:!1,filter:"",queue:[],semaphore:0});var a=v("qunit-tests"),b=v("qunit-banner"),c=v("qunit-testresult");a&&(a.innerHTML=""),b&&(b.className=""),c&&c.parentNode.removeChild(c),a&&(c=document.createElement("p"),c.id="qunit-testresult",c.className="result",a.parentNode.insertBefore(c,a),c.innerHTML="Running...<br/>&nbsp;")},reset:function(){var a=v(i.fixtureId),b;a&&(typeof App!="undefined"?b=App.Cache.get("fixtures").by("name",i.current.feature).source:typeof Visual!="undefined"?b=Visual.fixture:b=i.fixture,a.innerHTML=b)},triggerEvent:function(a,b,c){document.createEvent?(c=document.createEvent("MouseEvents"),c.initMouseEvent(b,!0,!0,a.ownerDocument.defaultView,0,0,0,0,0,!1,!1,!1,!1,0,null),a.dispatchEvent(c)):a.fireEvent&&a.fireEvent("on"+b)},is:function(a,b){return h.objectType(b)==a},objectType:function(a){if(typeof a=="undefined")return"undefined";if(a===null)return"null";var b=d.call(a).match(/^\[object\s(.*)\]$/)[1]||"";switch(b){case"Number":return isNaN(a)?"nan":"number";case"String":case"Boolean":case"Array":case"Date":case"RegExp":case"Function":return b.toLowerCase()}return typeof a=="object"?"object":undefined},push:function(a,b,c,d){var e={result:a,message:d,actual:b,expected:c};d=m(d)||(a?"okay":"failed"),d='<span class="test-message">'+d+"</span>",c=m(h.jsDump.parse(c)),b=m(h.jsDump.parse(b));var f=d+'<table><tr class="test-expected"><th>Expected: </th><td><pre>'+c+"</pre></td></tr>";b!=c&&(f+='<tr class="test-actual"><th>Result: </th><td><pre>'+b+"</pre></td></tr>",f+='<tr class="test-diff"><th>Diff: </th><td><pre>'+h.diff(c,b)+"</pre></td></tr>");if(!a){var g=l();g&&(e.source=g,f+='<tr class="test-source"><th>Source: </th><td><pre>'+m(g)+"</pre></td></tr>")}f+="</table>",x("log",h,e),i.current.assertions.push({result:!!a,message:f})},url:function(b){b=t(t({},h.urlParams),b);var c="?",d;for(d in b){if(!e.call(b,d))continue;c+=encodeURIComponent(d)+"="+encodeURIComponent(b[d])+"&"}return a.location.pathname+c.slice(0,-1)},extend:t,id:v,addEvent:u}),t(h.constructor.prototype,{begin:w("begin"),done:w("done"),log:w("log"),testStart:w("testStart"),testDone:w("testDone"),featureStart:w("featureStart"),featureDone:w("featureDone"),moduleStart:w("moduleStart"),moduleDone:w("moduleDone")});if(typeof document=="undefined"||document.readyState==="complete")i.autorun=!0;h.load=function(){x("begin",h,{});var c=t({},i);h.init(),t(i,c),i.blocking=!1;var d="",e=i.urlConfig.length;for(var f=0,g;f<e,g=i.urlConfig[f];f++)i[g]=h.urlParams[g],d+='<label><input name="'+g+'" type="checkbox"'+(i[g]?' checked="checked"':"")+">"+g+"</label>";var j=v("qunit-userAgent");j&&(j.innerHTML=navigator.userAgent);var k=v("qunit-header");k&&(k.innerHTML='<a href="'+h.url({filter:undefined})+'"> '+k.innerHTML+"</a> "+d,u(k,"change",function(b){var c={};c[b.target.name]=b.target.checked?!0:undefined,a.location=h.url(c)}));var l=v("qunit-testrunner-toolbar");if(l){var m=document.createElement("input");m.type="checkbox",m.id="qunit-filter-pass",u(m,"click",function(){var a=document.getElementById("qunit-tests");if(m.checked)a.className=a.className+" hidepass";else{var c=" "+a.className.replace(/[\n\t\r]/g," ")+" ";a.className=c.replace(/ hidepass /," ")}b.sessionStorage&&(m.checked?sessionStorage.setItem("qunit-filter-passed-tests","true"):sessionStorage.removeItem("qunit-filter-passed-tests"))});if(i.hidepassed||b.sessionStorage&&sessionStorage.getItem("qunit-filter-passed-tests")){m.checked=!0;var n=document.getElementById("qunit-tests");n.className=n.className+" hidepass"}l.appendChild(m);var o=document.createElement("label");o.setAttribute("for","qunit-filter-pass"),o.innerHTML="Hide passed tests",l.appendChild(o)}var p=v(i.fixtureId);p&&(i.fixture=p.innerHTML),i.autostart&&h.start()},u(a,"load",h.load),a.onerror=function(a,b,c){h.config.current?ok(!1,a+", "+b+":"+c):test("global failure",function(){ok(!1,a+", "+b+":"+c)})},h.equiv=function(){function d(a,b,c){var d=h.objectType(a);if(d)return h.objectType(b[d])==="function"?b[d].apply(b,c):b[d]}var a,b=[],c=[],e=Object.getPrototypeOf||function(a){return a.__proto__},f=function(){function d(a,b){return a instanceof b.constructor||b instanceof a.constructor?b==a:b===a}return{string:d,"boolean":d,number:d,"null":d,"undefined":d,nan:function(a){return isNaN(a)},date:function(a,b){return h.objectType(a)==="date"&&b.valueOf()===a.valueOf()},regexp:function(a,b){return h.objectType(a)==="regexp"&&b.source===a.source&&b.global===a.global&&b.ignoreCase===a.ignoreCase&&b.multiline===a.multiline},"function":function(){var a=b[b.length-1];return a!==Object&&typeof a!="undefined"},array:function(b,d){var e,f,g,i;if(h.objectType(b)!=="array")return!1;i=d.length;if(i!==b.length)return!1;c.push(d);for(e=0;e<i;e++){g=!1;for(f=0;f<c.length;f++)c[f]===d[e]&&(g=!0);if(!g&&!a(d[e],b[e]))return c.pop(),!1}return c.pop(),!0},object:function(d,f){var g,h,i,j=!0,k=[],l=[];if(f.constructor===d.constructor||e(f)===null&&e(d)===Object.prototype||e(d)===null&&e(f)===Object.prototype){b.push(f.constructor),c.push(f);for(g in f){i=!1;for(h=0;h<c.length;h++)c[h]===f[g]&&(i=!0);k.push(g);if(!i&&!a(f[g],d[g])){j=!1;break}}b.pop(),c.pop();for(g in d)l.push(g);return j&&a(k.sort(),l.sort())}return!1}}}();return a=function(){var a=Array.prototype.slice.apply(arguments);return a.length<2?!0:function(a,b){return a===b?!0:a===null||b===null||typeof a=="undefined"||typeof b=="undefined"||h.objectType(a)!==h.objectType(b)?!1:d(a,f,[b,a])}(a[0],a[1])&&arguments.callee.apply(this,a.splice(1,a.length-1))},a}(),h.jsDump=function(){function a(a){return'"'+a.toString().replace(/"/g,'\\"')+'"'}function b(a){return a+""}function c(a,b,c){var d=g.separator(),e=g.indent(),f=g.indent(1);return b.join&&(b=b.join(","+d+f)),b?[a,f+b,e+c].join(d):a+c}function e(a,b){var d=a.length,e=Array(d);this.up();while(d--)e[d]=this.parse(a[d],undefined,b);return this.down(),c("[",e,"]")}var f=/^function (\w+)/,g={parse:function(a,b,c){c=c||[];var d=this.parsers[b||this.typeOf(a)];b=typeof d;var e=z(a,c);if(e!=-1)return"recursion("+(e-c.length)+")";if(b=="function"){c.push(a);var f=d.call(this,a,c);return c.pop(),f}return b=="string"?d:this.parsers.error},typeOf:function(a){var b;return a===null?b="null":typeof a=="undefined"?b="undefined":h.is("RegExp",a)?b="regexp":h.is("Date",a)?b="date":h.is("Function",a)?b="function":typeof a.setInterval!==undefined&&typeof a.document!="undefined"&&typeof a.nodeType=="undefined"?b="window":a.nodeType===9?b="document":a.nodeType?b="node":d.call(a)==="[object Array]"||typeof a.length=="number"&&typeof a.item!="undefined"&&(a.length?a.item(0)===a[0]:a.item(0)===null&&typeof a[0]=="undefined")?b="array":b=typeof a,b},separator:function(){return this.multiline?this.HTML?"<br />":"\n":this.HTML?"&nbsp;":" "},indent:function(a){if(!this.multiline)return"";var b=this.indentChar;return this.HTML&&(b=b.replace(/\t/g," ").replace(/ /g,"&nbsp;")),Array(this._depth_+(a||0)).join(b)},up:function(a){this._depth_+=a||1},down:function(a){this._depth_-=a||1},setParser:function(a,b){this.parsers[a]=b},quote:a,literal:b,join:c,_depth_:1,parsers:{window:"[Window]",document:"[Document]",error:"[ERROR]",unknown:"[Unknown]","null":"null","undefined":"undefined","function":function(a){var b="function",d="name"in a?a.name:(f.exec(a)||[])[1];return d&&(b+=" "+d),b+="(",b=[b,h.jsDump.parse(a,"functionArgs"),"){"].join(""),c(b,h.jsDump.parse(a,"functionCode"),"}")},array:e,nodelist:e,arguments:e,object:function(a,b){var d=[];h.jsDump.up();for(var e in a){var f=a[e];d.push(h.jsDump.parse(e,"key")+": "+h.jsDump.parse(f,undefined,b))}return h.jsDump.down(),c("{",d,"}")},node:function(a){var b=h.jsDump.HTML?"&lt;":"<",c=h.jsDump.HTML?"&gt;":">",d=a.nodeName.toLowerCase(),e=b+d;for(var f in h.jsDump.DOMAttrs){var g=a[h.jsDump.DOMAttrs[f]];g&&(e+=" "+f+"="+h.jsDump.parse(g,"attribute"))}return e+c+b+"/"+d+c},functionArgs:function(a){var b=a.length;if(!b)return"";var c=Array(b);while(b--)c[b]=String.fromCharCode(97+b);return" "+c.join(", ")+" "},key:a,functionCode:"[code]",attribute:a,string:a,date:a,regexp:b,number:b,"boolean":b},DOMAttrs:{id:"id",name:"name","class":"className"},HTML:!1,indentChar:" ",multiline:!0};return g}(),h.diff=function(){function a(a,b){var c={},d={};for(var f=0;f<b.length;f++)c[b[f]]==null&&(c[b[f]]={rows:[],o:null}),c[b[f]].rows.push(f);for(var f=0;f<a.length;f++)d[a[f]]==null&&(d[a[f]]={rows:[],n:null}),d[a[f]].rows.push(f);for(var f in c){if(!e.call(c,f))continue;c[f].rows.length==1&&typeof d[f]!="undefined"&&d[f].rows.length==1&&(b[c[f].rows[0]]={text:b[c[f].rows[0]],row:d[f].rows[0]},a[d[f].rows[0]]={text:a[d[f].rows[0]],row:c[f].rows[0]})}for(var f=0;f<b.length-1;f++)b[f].text!=null&&b[f+1].text==null&&b[f].row+1<a.length&&a[b[f].row+1].text==null&&b[f+1]==a[b[f].row+1]&&(b[f+1]={text:b[f+1],row:b[f].row+1},a[b[f].row+1]={text:a[b[f].row+1],row:f+1});for(var f=b.length-1;f>0;f--)b[f].text!=null&&b[f-1].text==null&&b[f].row>0&&a[b[f].row-1].text==null&&b[f-1]==a[b[f].row-1]&&(b[f-1]={text:b[f-1],row:b[f].row-1},a[b[f].row-1]={text:a[b[f].row-1],row:f-1});return{o:a,n:b}}return function(b,c){b=b.replace(/\s+$/,""),c=c.replace(/\s+$/,"");var d=a(b==""?[]:b.split(/\s+/),c==""?[]:c.split(/\s+/)),e="",f=b.match(/\s+/g);f==null?f=[" "]:f.push(" ");var g=c.match(/\s+/g);g==null?g=[" "]:g.push(" ");if(d.n.length==0)for(var h=0;h<d.o.length;h++)e+="<del>"+d.o[h]+f[h]+"</del>";else{if(d.n[0].text==null)for(c=0;c<d.o.length&&d.o[c].text==null;c++)e+="<del>"+d.o[c]+f[c]+"</del>";for(var h=0;h<d.n.length;h++)if(d.n[h].text==null)e+="<ins>"+d.n[h]+g[h]+"</ins>";else{var i="";for(c=d.n[h].row+1;c<d.o.length&&d.o[c].text==null;c++)i+="<del>"+d.o[c]+f[c]+"</del>";e+=" "+d.n[h].text+g[h]+i}}return e}}()}(this),function(a){var b,c;a.QUnit||(b=a.test,c=a.async_test,a.assertEqual=a.equal=a.assert_equals,a.deepEqual=a.assert_object_equals,a.assert=a.ok=function(b,c){a.assert_true(!!b,c)},a.module=function(b,c){a.setup(c.setup)},a.test=function(a,c){b(c,a)},a.asyncTest=function(a,b){var d,e=c(a,{timeout:5e3});return b&&e.step(function(){b(e)}),e}),a.QUnit&&(c=a.QUnit.asyncTest,a.assert=a.test.assert=a.ok,a.asyncTest=function(a,b,d){typeof b=="function"&&(d=b);var e={done:function(){start()},step:function(a){setTimeout(a,0)}};c(a,function(){d(e)})},a.QUnit.config.autostart=!1)}(this),function(a){var b=[].slice,c={}.toString,d={}.hasOwnProperty,e={},f=["Object","Number","String","Boolean","Function","RegExp","Array","Date","Error"],g=function(a){var b=a.location&&a.location.search||"";return b.replace(/^\?/,"").split("&").map(function(a){var b=a.split("=");return{key:b[0],value:b[1]||!0}})}(a),h=[],i=[],j={nop:function(){},uniqueId:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(a){var b=Math.random()*16|0;return(a==="x"?b:b&3|8).toString(16)}).toUpperCase()},isKindOf:function(a,b){return a!=null&&c.call(a)==="[object "+b+"]"},kindOf:function(a){return a!=null&&/^\[object (.*)\]$/.exec(c.call(a))[1]},clone:function(a){var b,c,d,e=[];if(Array.isArray(a)){for(d=0,c=a.length;d<c;d++)b=a[d],typeof b=="object"&&(b=j.clone(b)),e[d]=b;return e}return Object.create({},function(a){var b={};return Object.getOwnPropertyNames(a).forEach(function(c){var d=Object.getOwnPropertyDescriptor(a,c);typeof a[c]=="object"&&(d.value=j.clone(a[c])),b[c]=d}),b}(a))},extend:function(a){var c,d,e=b.call(arguments,1),f=e.length,g=0;for(;g<f;g++){c=j.clone(e[g]);for(d in c)a[d]=c[d]}return a}},k=" -webkit- -moz- -o- -ms- ".split(" "),l="Webkit Moz O ms",m=l.split(" "),n=l.toLowerCase().split(" ");m.push("WebKit","Moz","MS","O"),n.push("WebKit","Moz","MS","O"),f.forEach(function(a){e["[object "+a+"]"]=a,j["is"+a]=function(b){return j.kindOf(b)===a}}),j.isHTML=function(a){return a=a.trim(),a.charAt(0)==="<"&&a.charAt(a.length-1)===">"&&a.length>=3},j.prefixes={css:k,dom:n,cssom:m,expandCss:function(a,b){return k.join(a+";")+(b||"")}},j.get={string:function(a,b){return!!~(""+a).indexOf(b)},cssProp:function(a,b,c){var d,e,f,g;c=c||!1;if(!c)return b in a.style;d=b.charAt(0).toUpperCase()+b.substr(1),e=(b+" "+m.join(d+" ")+d).split(" "),f=0,g=e.length;for(f=0;f<g;f++)if(e[f]in a.style)return!0;return!1},domProp:function(a,b,c){var d,e,f,g;c=c||!1;if(!c)return a[b]!==undefined?a[b]:!1;d=b.charAt(0).toUpperCase()+b.substr(1),e=(b+" "+n.join(d+" ")+d).split(" "),f=0,g=e.length;for(f=0;f<g;f++)if(e[f]in a)return a[e[f]];return!1}},j.inject=function(a,b){var c,d,e;return typeof b=="string"&&(j.isHTML(b)?(d=/^<(\w+)\s*\/?>(?:<\/\1>)?$/.exec(b),d&&d.length&&d[1]&&(b=document.createElement(d[1]))):b=document.querySelector(b)),typeof a=="string"?(j.isHTML(a)&&!/^<style/.test(a)?c="innerHTML":(c="innerText"in b?"innerText":"textContent",/^<style/.test(a)&&(c="textContent")),b[c]+=a):a.nodeType===1&&b.appendChild(a),b},j.hostAPI=function(a,b){return j.get.domProp(window,a,b)||!1},j.API=function(a,b,c,d){var e;return arguments.length===1&&("expect"in a&&(d=a.expect),"withPrefixes"in a&&(c=a.withPrefixes),b=a.api,a=a.host),!a||a==null?undefined:(e=j.get.domProp(a,b,c),arguments.length!==1&&arguments.length!==4||e!==d?e||undefined:e)},j.simulate=function(a,b,c){var d;a==="click"?(d=document.createEvent("MouseEvents"),d.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null)):(d=document.createEvent("HTMLEvents"),d.initEvent(a,!0,!1)),d.synthetic=!0,c&&j.extend(d,c),b.dispatchEvent(d)},j.on=function(a,b){(i[a]||(i[a]=[])).push(b)},j.once=function(a,b){function c(){b.apply(this,arguments),j.off(a,b)}j.on(a,c)},j.off=function(a,b){var c=i[a];c&&(b?c.splice(c.indexOf(b),1):i[a]=[])},j.emit=function(a){var b=0,c=[].slice.call(arguments,1),d=i[a]||[],e=d.length;for(;b<e;b++)d[b]&&d[b].apply(this,c)},[["on","addEventListener"],["off","removeEventListener"]].forEach(function(a){var b,c,d;b=a[0],c=a[1],d=j[b],j[b]=function(){var a,b,e,f;if(typeof arguments[0]=="string")return d.apply(j,[].slice.call(arguments));a=arguments[0],b=arguments[1],e=arguments[2],f=arguments[3]||!1,a[c]&&a[c].call(a,b,e,f)}}),j.results={};var o=0,p={all:!1};j.ring=function(a){j.ring.cache.push(a)},j.ring.cache=[],j.ring.getCount=function(a){var b=j.ring.cache[a];return b&&b.features||0},j.ring.totals=function(){return a.QUnit.config.stats},j.next=function(){var b=j.ring.cache[o];b&&b.test(),setTimeout(function(){a.QUnit.start()},1e3)},j.start=function(){j.next(),j.emit("runner:start")},j.on("runner:done",function(){if(a.Rng&&a.Rng.isFake)return;a.QUnit.config.autorun=!1,a.QUnit.config.blocking=!1,a.QUnit.config.semaphore=0,a.QUnit.load()}),j.on("runner:ringDone",function(b){console.log("exports.Rng!!!!!!!",a.Rng);if(a.Rng&&a.Rng.isFake)return;a.QUnit&&(["previousFeature","previousModule","previousRing","currentFeature","currentModule"].forEach(function(b){a.QUnit.config[b]=""}),a.QUnit.config.autorun=!1,a.QUnit.config.blocking=!1,a.QUnit.config.semaphore=0,a.QUnit.stop(),console.log("Stopped ("+o+")"),console.log("Waiting...")),o++,(p.all||b.failed===0)&&j.next()}),j.Runner=function(){},j.Runner.config=function(b,c){QUnit.config[b]&&(a.QUnit.config[b]=c),p[b]=c},g.push({key:"all",value:!0}),g&&g.forEach(function(a){p[a.key]=a.value}),j.prefixes.expand=j.prefixes.expandCss,j.test=j.check=j.get,a.TopHat=a.Hat=a.H=j}(typeof exports=="object"&&exports||this),function(a,b){function g(a){var b;for(b in a)this[b]=a[b];this.history=[Math.PI*1.5]}var c=[],d={},e={running:"255, 255, 255",clear:"255, 255, 255",pass:"0, 199, 59",fail:"182, 184, 186"},f={nomore:"No more ticks available for this ring"};g.prototype.draw=function(a,b,c,d){var e="rgba("+c+", "+d+")";this.ctx.beginPath(),this.ctx.arc(this.ctx.canvas.width/2,this.ctx.canvas.height/2,this.radius,a,b,!1),this.ctx.strokeStyle=e,this.ctx.lineWidth=this.line,this.ctx.stroke(),this.ctx.closePath()},g.prototype.tick=function(a,b){if(this.history.length>this.ticks){console.log(f.nomore);return}if(!a||typeof a!="string")b=a,a="tick";var c=this.history[this.history.length-1],d=c+this.step,g=1,h=e.running;b&&(h=e[b.failed?"fail":"pass"]),this.draw(c,d+.009,h,g),a==="tick"&&(this.draw(c,d+.009,h,g),this.history.push(d))},g.trace=function(){var a,b,e=document.createElement("canvas"),f={width:null,height:null},h=function(){var a;for(a in d)return d[a].canvas}();e.style.position="relative",e.style.top="-305px",e.style.left="-5px",e.width=h.width+10,e.height=h.height+10,h.parentNode.insertBefore(e,h.nextSibling),a=e.getContext("2d"),f.width=a.canvas.width/2,f.height=a.canvas.height/2,b=g.get(0).line*c.length+1,a.fillRect(f.width-4,10,8,b),a.fillRect(f.width+65,f.height-10,b,21),a.font="bold 12px Helvetica",c.concat([{line:25}]).forEach(function(b,d){a.beginPath(),a.arc(f.width,f.height-3,b.line*(d+1)+40,Math.PI*2,0,!1),a.strokeStyle="rgba( 0, 0, 0, 1 )",a.lineWidth=8,a.stroke(),a.closePath(),a.fillStyle="rgba( 255, 255, 255, 1 )",d<c.length&&a.fillText("r."+d,f.width+(b.line*(d+1)+45),f.height+5)})},g.create=function(b,e){var f,h=a.Ring.config;return e.index==null&&(e.index=c.length),e.ticks==null&&(e.ticks=0),e.diameter=h.diameter.next||h.diameter.initial,h.diameter.next=(h.diameter.next||h.diameter.initial)+h.diameter.padding*2,e.radius=e.diameter/2,!(e.index>0),e.line=h.line.initial,e.circ=e.diameter*Math.PI,e.step=Math.PI*2/e.ticks,d[b]||(d[b]=document.getElementById(b).getContext("2d")),e.ctx=d[b],c.push(new g(e)),c[c.length-1]},g.create.all=function(a){b.ring.cache.length&&(b.ring.cache.forEach(function(b){g.create(a,{ticks:b.features})}),g.trace())},g.get=function(a){return a!=null&&c[a]},g.config={diameter:{padding:25,initial:150,next:0},line:{initial:25}},typeof global!="undefined"&&(g.config.contexts={},d=g.config.contexts),a.Ring=g,a.Hat&&(a.Hat.Ring=a.Ring)}(typeof exports=="object"&&exports||this,this.Hat||{}),function(a,b){var c=[];["begin","log","done","testStart","testDone","moduleStart","moduleDone","featureStart","featureDone"].filter(function(a){return!~c.indexOf(a)}).forEach(function(a){b[a]=function(b){var c=a;a==="log"&&!!b.result,Hat.emit("runner:"+c.replace("module","ring"),b)}})}(this,this.QUnit);
View
3  lib/h.js
@@ -533,6 +533,9 @@
};
// `params` initialized at top of program file
+ // Force all rings to run, all the time.
+ params.push({ key: "all", value: true });
+
if ( params ) {
params.forEach(function( obj ) {
runnerConfig[ obj.key ] = obj.value;
Please sign in to comment.
Something went wrong with that request. Please try again.