2011-08-10 16:30:36 -04:00
<!DOCTYPE html>
< html >
< head >
< meta http-equiv = "Content-Type" content = "text/html;charset=UTF-8" >
< link rel = "stylesheet" href = "qunit/qunit.css" type = "text/css" / >
< title > Kis-js test app< / title >
2011-11-02 19:12:58 -04:00
<!-- [if IE 8]>
< script type = "text/javascript" >
var HTML5 = "article,aside,audio,canvas,details,figcaption,figure,footer,header,hgroup,mark,menu,meter,nav,output,progress,section,summary,time,video".split(",");
for (var i = 0, tagName; tagName = HTML5[i]; i++) document.createElement(tagName);
< / script >
<![endif]-->
2011-08-10 16:30:36 -04:00
< / head >
< body >
< h1 id = "qunit-header" > Kis-js Test Suite< / h1 >
< h2 id = "qunit-banner" > < / h2 >
< div id = "qunit-testrunner-toolbar" > < / div >
< h2 id = "qunit-userAgent" > < / h2 >
< ol id = "qunit-tests" > < / ol >
< div id = "qunit-fixture" >
test markup, will be hidden
< span id = "testSpan" > < / span >
< / div >
< section hidden = "hidden" >
< article id = "r14" >
This is important text!
< / article >
< aside id = "classChild" >
< p class = "child" > < / p >
< span class = "child" > < / span >
< div class = "nephew" > < / div >
< / aside >
< / section >
2011-11-03 13:47:11 -04:00
< script src = "../kis-custom.js" > < / script >
2011-08-10 16:30:36 -04:00
< script src = "qunit/qunit.js" > < / script >
2011-11-01 08:29:21 -04:00
< script type = "text/javascript" >
//Selector test function
function $(a)
{
var x = document.querySelectorAll(a);
//Return the single object if applicable
return (x.length === 1) ? x[0] : x;
}
2011-11-03 13:47:11 -04:00
//Object equivalence function
function is_clone(o1, o2)
{
var n,
flag=true;
for(n in o1)
{
2011-11-15 12:03:12 -05:00
//Do a shallow compare -- first level only
2011-11-03 16:04:35 -04:00
if($_.type(o1[n]) === "object")
{
if($_.type(o2[n]) !== "object")
2011-11-03 13:47:11 -04:00
{
2011-11-03 16:04:35 -04:00
flag = false;
break;
2011-11-03 13:47:11 -04:00
}
2011-11-03 16:04:35 -04:00
}
else
{
if(o1[n] !== o2[n])
2011-11-03 13:47:11 -04:00
{
2011-11-03 16:04:35 -04:00
flag = false;
break;
2011-11-03 13:47:11 -04:00
}
}
}
for(n in o2)
{
2011-11-15 12:03:12 -05:00
//Do a shallow compare -- first level only
2011-11-03 16:04:35 -04:00
if($_.type(o1[n]) === "object")
{
if($_.type(o2[n]) !== "object")
2011-11-03 13:47:11 -04:00
{
2011-11-03 16:04:35 -04:00
flag = false;
break;
2011-11-03 13:47:11 -04:00
}
2011-11-03 16:04:35 -04:00
}
else
{
if(o2[n] !== o1[n])
2011-11-03 13:47:11 -04:00
{
2011-11-03 16:04:35 -04:00
flag = false;
break;
2011-11-03 13:47:11 -04:00
}
}
}
return flag;
}
2011-11-01 08:29:21 -04:00
< / script >
< script src = "tests/core.js" > < / script >
< script src = "tests/ajax.js" > < / script >
< script src = "tests/event.js" > < / script >
< script src = "tests/dom.js" > < / script >
2011-11-03 13:47:11 -04:00
< script src = "tests/store.js" > < / script >
2011-11-01 08:29:21 -04:00
< script src = "tests/util.js" > < / script >
2011-12-06 11:47:22 -05:00
< script src = "tests/template.js" > < / script >
2011-08-10 16:30:36 -04:00
< / body >
< / html >