jsonp.html revision a1db253efdfe10b47f002c23646d43a887e2aeea
<!doctype html>
<html>
<head>
<title>Test Page</title>
</head>
<body class="yui3-skin-sam">
<ul id="log" class="yui3-g">
<li class="yui3-u-1-2" id="base-results">
<h2>jsonp tests</h2>
</li>
<li class="yui3-u-1-2" id="url-results">
<h2>jsonp-url tests</h2>
</li>
</ul>
<script>
YUI({
filter: (window.location.search.match(/[?&]filter=([^&]+)/) || [])[1] || 'min',
allowRollup: false,
useBrowserConsole: false
}).use('console-filters', 'jsonp-tests', function (Y) {
new Y.Console({
style: 'block',
//width: 'inherit',
entryTemplate: '<div class="{entry_class} {cat_class} {src_class}">'+
'<pre class="{entry_content_class}">{message}</pre>'+
'</div>',
on: {
entry: function (e) {
var m = e.message,
node;
if (m.category === 'info' &&
m.category = 'status';
} else if (m.category === 'fail') {
m.category = 'error';
}
}
},
after: {
render: function () {
this.get('contentBox').insertBefore( this._foot, this._body );
}
}
}).plug(Y.Plugin.ConsoleFilters, {
category: {
pass: false,
status: false
}
})
.render( "#base-results" );
Y.Test.Runner.after(Y.Test.Runner.COMPLETE_EVENT, function () {
YUI({
filter: 'raw',
useBrowserConsole: false
}).use('console-filters', 'jsonp-tests', 'jsonp-url-tests', function (Y) {
new Y.Console({
style: 'block',
//width: 'inherit',
entryTemplate: '<div class="{entry_class} {cat_class} {src_class}">'+
'<pre class="{entry_content_class}">{message}</pre>'+
'</div>',
on: {
entry: function (e) {
var m = e.message,
node;
if (m.category === 'info' &&
m.category = 'status';
} else if (m.category === 'fail') {
m.category = 'error';
}
}
},
after: {
render: function () {
this.get('contentBox').insertBefore( this._foot, this._body );
}
}
}).plug(Y.Plugin.ConsoleFilters, {
category: {
pass: false,
status: false
}
})
.render( "#url-results" );
});
});
});
</script>
</body>
</html>