kis-js/tests/index.html

106 lines
2.3 KiB
HTML
Raw Normal View History

<!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]-->
</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>
<script src="../kis-custom.js"></script>
<script src="qunit/qunit.js"></script>
<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;
}
//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 16:04:35 -04:00
flag = false;
break;
}
2011-11-03 16:04:35 -04:00
}
else
{
if(o1[n] !== o2[n])
{
2011-11-03 16:04:35 -04:00
flag = false;
break;
}
}
}
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 16:04:35 -04:00
flag = false;
break;
}
2011-11-03 16:04:35 -04:00
}
else
{
if(o2[n] !== o1[n])
{
2011-11-03 16:04:35 -04:00
flag = false;
break;
}
}
}
return flag;
}
</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>
<script src="tests/store.js"></script>
<script src="tests/util.js"></script>
2011-12-06 11:47:22 -05:00
<script src="tests/template.js"></script>
</body>
</html>