data tables are going to need some work yet, but the other stuff seems to be working 100%
85 lines
2.8 KiB
HTML
85 lines
2.8 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
|
<html>
|
|
<head>
|
|
<title>yuiloader test</title>
|
|
|
|
<script type="text/javascript">
|
|
|
|
(function() {
|
|
|
|
var logger, suite, page_modules=[];
|
|
|
|
function log(msg) {
|
|
|
|
if (logger) {
|
|
YAHOO.log(msg);
|
|
} else if (typeof console !== "undefined" && console.debug) {
|
|
console.debug(msg);
|
|
} else {
|
|
var d=document, b=d.body, n=d.createElement("div");
|
|
if (b) {
|
|
n.appendChild(d.createTextNode(msg));
|
|
b.appendChild(n);
|
|
}
|
|
}
|
|
}
|
|
|
|
YAHOO_config = {
|
|
listener: function(minfo) {
|
|
var n = minfo.name;
|
|
page_modules.push(n);
|
|
log("page load listener: " + n);
|
|
},
|
|
load: {
|
|
require: ['yuitest', 'editor'],
|
|
//filter: 'DEBUG',
|
|
//allowRollup: false,
|
|
base: '../build/',
|
|
onLoadComplete: function(loader) {
|
|
|
|
YAHOO.widget.Logger.enableBrowserConsole();
|
|
logger = new YAHOO.tool.TestLogger();
|
|
log("onLoadComplete");
|
|
|
|
suite=new YAHOO.tool.TestSuite("yuisuite", "editor");
|
|
|
|
suite.add(new YAHOO.tool.TestCase({
|
|
name : "yuiloader",
|
|
test_page_modules: function() {
|
|
YAHOO.util.ArrayAssert.itemsAreEqual(
|
|
// the page-level listener fires after the onLoadComplete
|
|
// fires, so editor will not be in the list yet
|
|
["yahoo", "dom", "event", "yahoo-dom-event", "logger",
|
|
"yuitest", "container", "menu", "element", "button"],
|
|
page_modules);
|
|
},
|
|
|
|
// if this fails the css was not applied correctly (in this case
|
|
// it ususally means the rollup skin.css was not found)
|
|
test_logger_css: function() {
|
|
var el = YAHOO.util.Dom.getElementsByClassName("error")[0];
|
|
YAHOO.util.Assert.areEqual("rgb(227, 47, 11)",
|
|
YAHOO.util.Dom.getStyle(el, "background-color"),
|
|
"An element with the error class is not red");
|
|
}
|
|
}));
|
|
|
|
YAHOO.tool.TestRunner.add(suite);
|
|
YAHOO.tool.TestRunner.run();
|
|
}
|
|
}
|
|
};
|
|
|
|
})();
|
|
|
|
</script>
|
|
|
|
<script type="text/javascript" src="../build/yuiloader/yuiloader-beta.js"></script>
|
|
|
|
</head>
|
|
<body id="yahoo-com" class="yui-skin-sam">
|
|
<h1>YUI Loader</h1>
|
|
<p>yuiloader is loading the test library, so if it fails the test probably won't run at all</p>
|
|
<p>Testing rollups (yahoo-dom-event) which is verified in the test.</p>
|
|
</body>
|
|
</html>
|