config.html revision 057f679a4a4b0aea4c6f97f6ac80ae7bc8f34bd4
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Config Tests</title>
</head>
<body class="yui3-skin-sam">
<h1>Core Tests</h1>
<p><input type="button" value="Run Tests" id="btnRun" disabled="true" /></p>
<script type="text/javascript" src="/build/yui/yui.js"></script>
<script type="text/javascript">
var YUI_config = {
gconfig: true
};
YUI({
filter: "debug",
logExclude: {Dom: true, Selector: true, Node: true, attribute: true, base: true, event: true, widget: true}
}).use("dump", "test", "console", function(Y) {
var button = Y.one('#btnRun');
// Set up the page
button.set("disabled", false);
Y.on("click", function() {
Y.Test.Runner.run();
}, button);
var myConsole = new Y.Console().render();
var testCore = new Y.Test.Case({
name: "Config tests",
test_config: function() {
Y.Assert.areEqual('debug', Y.config.filter);
Y.Assert.isObject(Y.config.logExclude);
Y.Assert.isTrue(Y.config.gconfig);
YUI().use('node', function(Y2) {
Y.Assert.isUndefined(Y2.config.logExclude);
Y.Assert.isUndefined(Y2.config.filter);
Y.Assert.isTrue(Y2.config.gconfig);
});
var o1 = { a: 1 };
var o2 = { b: 1 };
var o3 = { c: 1 };
var o4 = { d: 1 };
var o5 = { e: 1 };
var o6 = { f: 1 };
YUI(o1, o2, o3, o4, o5, o6).use('node', function(Y2) {
Y.Assert.areEqual(1, Y2.config.f);
Y.Assert.isTrue(Y2.config.gconfig);
});
}
});
Y.Test.Runner.add(testCore);
Y.Test.Runner.run();
});
</script>
</body>
</html>